How to style these buttons individually?

  • Posts: 151
  • Thank you received: 9
11 years 7 months ago #65585

Hi,

On the product page (show_default.php) I have 3 buttons:

- Add to Cart
- Ask a Question
- Add to Wishlist

These buttons all share the same class: hikashop_cart_button

Where can I change the class of the "Ask a Question" and "Add to Wishlist" buttons?
It cannot be done in show_default.php.

I want to style these buttons separately from the Add to Cart button.

Thank you,
Maurice

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
11 years 7 months ago #65591

Hi,

You can use such CSS:
.hikashop_product_stock table input{
//css for add to cart button
}
#hikashop_add_wishlist input{
//css for wishlist button
}
#hikashop_product_contact_main input{
//css for contact button
}

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

  • Posts: 151
  • Thank you received: 9
11 years 7 months ago #65605

Hi Nicolas,

I have tried what you suggested but it does not work. When I look with firebug, I see no references to these buttons.
The three buttons themselves only have the shared class hikashop_cart_button.

So if I know the file(s) where this class is added to the button objects, I can easily change them.

Kind regards,
Maurice

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
11 years 7 months ago #65608

It might be that you're not using the normal buttons but the CSS buttons and in that case, the "input" has to be changed to "a" in the code I gave.
There is no need to edit the file directly. It's not a view but a helper file (administrator/components/com_hikashop/helpers/cart.php) and you won't be able to easily change it and you will loose your changes when you update.

Also make sure that you clear your browser cache when you try.

The following user(s) said Thank You: Maurice

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

  • Posts: 151
  • Thank you received: 9
11 years 7 months ago #65624

Yep, I'm using the CSS style.
It works now, you really know your stuff... ;)

Thank you very much! :cheer:
Maurice

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

Time to create page: 0.062 seconds
Powered by Kunena Forum