changing colours of buttons

  • Posts: 15
  • Thank you received: 0
7 years 2 months ago #278153

-- url of the page with the problem -- : fensifashionthings.com
-- HikaShop version -- : 3.2.0
-- Joomla version -- : 3.7.5

I want to change the colours of the log-in button and registration button. I should do that in template css, i managed to do it for the colour of the cart-button, but i can't find the css code for the log-in and register buttons. How does that code looks like?

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 2 months ago #278156

Hello,

Which "login" and "register" buttons ?
Without precise details we can't know the buttons you're talking about and we would consider that you're talking about the Joomla buttons.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 15
  • Thank you received: 0
7 years 2 months ago #278241

Hello Jerome

I am having a problem changing the colour of the login and register buttum on the checkout page in Hikashop.

I know now why you are asking which buttons because you don't see a checkoutpage anymore. The last thing a did yesterday was take a look in the field "login" on display, views and then selected checkout, template fensi and then looked in to login and login_form. I am sure i did not change anything but the "login" is empty now, there is no code anymore. I tried to copy this code from another site which is the same, just another language and try to past ist there. after saving the code it disapears again. On the other website the "login"code also disapears now and i have the same problem that there is no login an registration form anymore. ( www.fensifashionthings.eu

How do i fix this problem?

By the way my Hikashop version is 3.0.1

Please Log in or Create an account to join the conversation.

  • Posts: 15
  • Thank you received: 0
7 years 2 months ago #278246

Hello Jerome,

I fixed the problem discribed below by removing the changes, how simple can it be.

So now you can see the checkout page again and see that the login buttom and register buttom. I want to change the colours but what kind of CSS code do i use.

For changing the cart colour i found this code
a.hikashop_cart_button{
color: #F22865 !important;
}

but what do i have ti use for login: hikashop_checkout_form.submit ?

but what do i have ti use for register: hikashop_register_form_button?

bye the way updated to 3.2.0

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 2 months ago #278247

Hello,

I'm asking you which buttons you're talking about because you gave us the link of your homepage.
So how could we know in which page are your buttons ?
Because it could be your login page, where you have the same buttons with the same classnames (so same colors) :
www.fensifashionthings.eu/de/component/users/

I'm afraid that these colors are handle directly by your template and it's not related to HikaShop or its CSS.
But we do have a documentation page which should help you :
www.hikashop.com/support/documentation/1...the-display.html#css

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 15
  • Thank you received: 0
7 years 2 months ago #278342

Hello Jerome,

I have read the documentation, in the example in the documentation (changing colour of the price) it is clear to me what has to be done.

Here is the HTML code which i see when using firebug for the login button on the hikashop checkoutpage
<input class="btn button hikashop_cart_input_button btn btn-primary" name="login" value="Bejelentkezés" onclick="var field=document.getElementById('hikashop_product_quantity_field_1'); var b = document.getElementById('login_view_action'); if(b) { b.value = 'login'; } document.hikashop_checkout_form.submit(); return false;" type="submit">

it is not clear to me which one i have to use to change the colour of the button, is it .hikashop_cart_input_button or .hikashop_product_quantity_field_1 or .hikashop_checkout_form.submit

Here is the HTML code which i see when using firebug for the register button on the hikashop checkoutpage
<input class="btn button hikashop_cart_input_button btn btn-primary" name="register" value="Regisztrálás" onclick="var field=document.getElementById('hikashop_product_quantity_field_2'); hikashopSubmitForm('hikashop_checkout_form', 'register'); return false;" id="hikashop_register_form_button" type="submit">

it is not clear to me which one i have to use to change the colour of the button, is it .hikashop_cart_input_button? or hikashop_product_quantity_field_2 or .hikashop_register_form_button

Help me out so i can learn something from it.

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
7 years 2 months ago #278351

Hello,

Ok, I think I understand the situation, you don't know how to proceed.
You have to know that this forum aim is to help people to use HikaShop and guide them for customization.
So in order to guide you, here some basic way to guide you and customize css command :
selector {command: parameters;}

Let's analyse a part of your code, you provide :
<input class="btn button hikashop_cart_input_button btn btn-primary" name="login" value="Bejelentkezés" onclick="var field=document.getElementById('hikashop_product_quantity_field_1'); var b = document.getElementById('login_view_action'); if(b) { b.value = 'login'; } document.hikashop_checkout_form.submit(); return false;" type="submit">

So,here you can find your selector in the code you provide.
OR by using the navigator inspector tool, in this case you will see this :



Here, you see a selector listing, each selector is separated by a comma.
And you can see that 1 selector is in black font, while the others are grey.
The black font show which selector is applied, here on the text button.

If you want modify this css command and don't impact other html elements (targeted by other selectors) you have to :
- Remove your concerned selector from this listing
- Recreate it, with his own Css command
In your case, Css command will look like this kind of code :
Button_html_class {color: your color;}

Note : Here , you can learn how works the Css language works.

Hope this will help you.

Regards

Attachments:
Last edit: 7 years 2 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 15
  • Thank you received: 0
7 years 2 months ago #278460

Hello Philip,

That was exactly what i was looking for.
Thanks for you help and explanation, i learned something.
Problem solved

Please Log in or Create an account to join the conversation.

  • Posts: 15
  • Thank you received: 0
7 years 2 months ago #279093

I want to change the colour of the continue_shopping buton, with firebug i get this code

<input id="hikashop_checkout_shopping_button" class="btn button hikashop_cart_input_button" name="continue_shopping" value="Vásárlás folytatása" onclick="var field=document.getElementById('hikashop_product_quantity_field_6');window.location=' www.fensifashionthings.com/';return false;" type="submit">

i edit template css with this code

.hikashop_checkout_shopping_button .hikashop_cart_input_button{
background: #FF7F2A !important;
}
but the colour doesn't change

what did i do wrong?

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
7 years 2 months ago #279095

hikashop_checkout_shopping_button is the ID of the input. hikashop_cart_input_button is one of the classes of the button.
You can't add both, it's not valid, and for ids you should use # instead of .
So it should be either:
#hikashop_checkout_shopping_button{
background: #FF7F2A !important;
}
or:
.hikashop_cart_input_button{
background: #FF7F2A !important;
}

Please Log in or Create an account to join the conversation.

  • Posts: 15
  • Thank you received: 0
7 years 2 months ago #279125

Thanks Nicolas,

The first one works, the second one changes all the colours of the hikashop_cart_input_buttons.

Thanks for the explanation.

Please Log in or Create an account to join the conversation.

Time to create page: 0.084 seconds
Powered by Kunena Forum