CTA customisation

  • Posts: 107
  • Thank you received: 1
11 years 4 months ago #151262

Hi,
I have an Ice theme template and their demo's add to card button is red and has an icon on the left hand side (see screen grab), my template doesn't pull the same CSS class and I can see just a standard system button (see screen grab), I've been trying to get some answers from the template crowd but no success, I figured out that in order to pull little icon I need to have <span class="cart_btn_before"></span> before the button, how can I add the span? I noticed as well that the css class they use in demo is different then the one I have, I attached both, how can I change it?

I would appreciate any advice.

Thanks,
Kashka

-- url of the page with the problem -- : hammocks.ie/hammocksUAT/

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
11 years 4 months ago #151310

Hi,

I think that you have to edit the view "product / quantity" and replace:

echo $this->cart->displayButton(JText::_('ADD_TO_CART'),'add',$this->params,$url,$this->ajax,'',$max,$min);
By:
echo '<span class="cart_btn_before"></span>';
echo $this->cart->displayButton(JText::_('ADD_TO_CART'),'add',$this->params,$url,$this->ajax,'',$max,$min,' cart_btn');
This code is present many times.

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

  • Posts: 107
  • Thank you received: 1
11 years 4 months ago #151425

Hi,

Thanks for your help, I'm afraid it didn't solve the problem, still struggling to pull my template button style, just got an answer from the template support saying to set their theme as default from HikaShop configurations settings, do you know what that means and if it's relevant at all as I haven't come across that type of settings in hikashop?

Thanks,
Kashka

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

  • Posts: 13201
  • Thank you received: 2322
11 years 4 months ago #151463

Hi,

The modifications I gave you should work, I tried to add the code thanks to the browser console on your website.

To apply a template style, it's in the Joomla menu / module options that you can do that, not directly in the HikaShop ones.

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

  • Posts: 107
  • Thank you received: 1
11 years 4 months ago #151748

Hi,

Thanks for that, it worked:) I got the icon, now the rest of the button to style..

Kashka

Attachments:

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

  • Posts: 107
  • Thank you received: 1
11 years 4 months ago #151749

Yes, it worked on the listing page, but on the detail page is completely off, see the grab screen:(((
Will never get it right:((

Thanks for your help anyway...

kashka

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
11 years 4 months ago #151772

So the code to use is:

if(JRequest::getVar('task','') != 'show')
    echo '<span class="cart_btn_before"></span>';
echo $this->cart->displayButton(JText::_('ADD_TO_CART'),'add',$this->params,$url,$this->ajax,'',$max,$min,' cart_btn');

By this way the part before the button will not be present in the product page.

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

  • Posts: 107
  • Thank you received: 1
11 years 4 months ago #151921

Hi,

I made the amend to the quantity view as per your code and it didn't work, the icon is still showing on the product page, see the screen grab of the view.

Thanks,
Kashka

Attachments:

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

  • Posts: 107
  • Thank you received: 1
11 years 4 months ago #151932

Hi,
I think I know how to get the template style for my button, can you please tell me how to change the button input class from
a default one: btn button hikashop_cart_input_button to the btn button hikashop_cart_input_button cart_btn
by changing the class I change the style of my add to card button, see the screen grab, please help I can't find the view that pulls this class!

Thanks,
Kashka

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

  • Posts: 107
  • Thank you received: 1
11 years 4 months ago #151933

this time with the attachment to the previous post

Attachments:

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

  • Posts: 107
  • Thank you received: 1
11 years 4 months ago #151950

Xavier please ignore my posts, I removed the icon all together, too much hassle, thanks for your time.
Kashka

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

Time to create page: 0.091 seconds
Powered by Kunena Forum