How do I change the add to cart buttons?

  • Posts: 41
  • Thank you received: 0
13 years 6 months ago #18575

Hi I would like something similar to the add to cart buttons on your demo site but I can't seem to find how to do it, when I use css buttons I get a square edges yellow background button and it is on the left of the quantity, I want it on the right also. I would like to thank you in advance for your great support and a great product. In the css file it is linking to a button.jpeg in images but I can't find where this is.

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

  • Posts: 83041
  • Thank you received: 13405
  • MODERATOR
13 years 6 months ago #18577

Hi,

The add to cart buttons on our demo website are just normal HTML buttons. If you change back the option "button style" of the Display tab of the config to "normal" you should have the same buttons unless your template defines their CSS specifically.

The button image is located in the folder media/com_hikashop/images/

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

  • Posts: 41
  • Thank you received: 0
13 years 6 months ago #18578

Thanks for that I'll look at my template file and amend that

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

  • Posts: 477
  • Thank you received: 31
  • Hikashop Business
13 years 6 months ago #18605

Hello,

Is there an override to control button's in the cart? (and elsewhere…)

I had to change this file to fit my need: /administrator/components/com_hikashop/helpers/cart.php

line 56:

$html= '<a class="readon" '.$url.$ajax.$options.'><span>'.$name.'</span></a>';

I need the class "readon" and most of all the span tags.

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

  • Posts: 83041
  • Thank you received: 13405
  • MODERATOR
13 years 6 months ago #18614

You can use the button override hikashop_button_render($map,$name,$ajax,$options,$url) as explained in the documentation on: www.hikashop.com/support/documentation/6...tation.html#override

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

  • Posts: 477
  • Thank you received: 31
  • Hikashop Business
13 years 6 months ago #18625

Thank You.

So, there's an override.

But it's not so easy for beginners like me to find the right code.

Tried this with partial success (design is ok but some buttons don't work):

function
hikashop_button_render($map,$name,$ajax,$options,$url){
return '<a class="readon" '.$url.$ajax.$options.'><span>'.$name.'</span></a>';
}

Last edit: 13 years 6 months ago by nicolas.

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

  • Posts: 83041
  • Thank you received: 13405
  • MODERATOR
13 years 6 months ago #18638

Almost. It should be:

function
hikashop_button_render($map,$name,$ajax,$options,$url){
return '<a class="readon" href="'.$url.'" '.$ajax.$options.'><span>'.$name.'</span></a>';
}

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

  • Posts: 477
  • Thank you received: 31
  • Hikashop Business
13 years 6 months ago #18647

Perfect! I understand my mystake. Thanks a lot!

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

  • Posts: 126
  • Thank you received: 0
10 years 6 months ago #158224

Thank you for good information about overrides the all buttons on shop, but how to change only cart bottom in product slider? I change style of bottom with "default" on "CSS" in admin panel and I tried change bottom in CSS, but it's not effectively. I would like to receive only image(icon) without text. How I can do it?

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

  • Posts: 83041
  • Thank you received: 13405
  • MODERATOR
10 years 6 months ago #158254

No need to change any setting for that simply add CSS for that:
www.hikashop.com/forum/2-general-talk-ab...to-cart-graphic.html

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

  • Posts: 126
  • Thank you received: 0
10 years 6 months ago #158302

How to remove the text "add to card" from button? But only in product slider, not on other buttons

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

  • Posts: 83041
  • Thank you received: 13405
  • MODERATOR
10 years 6 months ago #158342

It's easy. Just add a
color:transparent !important;
for the class of your button on that page.

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

Time to create page: 0.090 seconds
Powered by Kunena Forum