HikaShop Button

  • Posts: 14
  • Thank you received: 0
10 years 2 days ago #214071

-- HikaShop version -- : 2.50
-- Joomla version -- : 3.4
-- PHP version -- : 2.4
-- Browser(s) name and version -- : Chrome

Welcome

I am trying to change button for HikaShop and i have found code where to insert CSS mod but i cannot find this on FTP.

div class="hikashop_product_stock"><a rel="nofollow" class="hikashop_cart_button" href="#" onclick="var field=document.getElementById('hikashop_product_quantity_field_1');if(hikashopCheckChangeForm('item','hikashop_product_form_5_hikashop_category_information_module_106')){ return hikashopModifyQuantity('5',field,1,'hikashop_product_form_5_hikashop_category_information_module_106','cart',106); } return false;">Add to cart</a><input id="hikashop_product_quantity_field_1" type="hidden" value="1" class="hikashop_product_quantity_field" name="quantity"

I need to change class="button-default" but can you tell me where to find this in Hika Files.


Greetings and Thank you G

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

  • Posts: 84305
  • Thank you received: 13700
  • MODERATOR
10 years 2 days ago #214077

Hi,

It comes from the line:

$html= '<a rel="nofollow" class="hikashop_cart_button'.$classname.'" '.$options.' '.$url.$ajax.'>'.$name.'</a>';
of the file administrator/components/com_hikashop/helpers/cart.php

But I would recommend instead to edit the file "quantity" via the menu Display>Views and change the lines:
echo $this->cart->displayButton(JText::_('ADD_TO_CART'), 'add', $this->params,$url, $this->ajax, '', $max, $min);
to:
echo str_replace('hikashop_cart_button','button-default',$this->cart->displayButton(JText::_('ADD_TO_CART'), 'add', $this->params,$url, $this->ajax, '', $max, $min));
That way, the change will be as a view override and you won't loose it when you update HikaShop in the future.

The following user(s) said Thank You: 1GREG

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

  • Posts: 14
  • Thank you received: 0
10 years 1 day ago #214149

Oh buttons looks so beautiful now XD As you see i even fixed stars code but i have problem with Finding that Class= in FTP files how did you found this?I mean you have this in memory or maybe you know easy way to find this class in files?

I am asking you this becose i have last button in coalacontact and once again i cannot find this simple line in files and maybe you know easy way to find wanted code.If yes can you tell me how you doing this?


No i was wrong its not last one HikaShop- Procced to Checkout button also left i am trying now to find this now.

Greetings and Thank you

Last edit: 10 years 1 day ago by 1GREG.

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

  • Posts: 84305
  • Thank you received: 13700
  • MODERATOR
10 years 1 day ago #214169

Hi,

I've developed myself HikaShop so I know it by memory.
But it's easy to search.
I just use the "search in files of a folder" feature of the software Notepad++, give it the path of my test website and it displays me all the results. You can do that too provided that you have a copy of your website files on your local computer.

The following user(s) said Thank You: 1GREG

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

Time to create page: 0.059 seconds
Powered by Kunena Forum