[SOLVED] Styling of some buttons

  • Posts: 117
  • Thank you received: 6
7 years 7 months ago #280208

-- HikaShop version -- : 3.2.0
-- Joomla version -- : 3.8.0
-- PHP version -- : 7.1.0
-- Browser(s) name and version -- : Firefox 56.0

Hi! I think (maybe I'm wrong) found that css classes from HikaShop settings will not applied to buttons which are generated via

$html = '<input type="'.$type.'" class="'.$class.' button hikashop_cart_input_button'.$classname.'" name="'.$map.'" value="'.$name.'" '.$ajax.$options.'/>';
from /administrator/components/com_hikashop/helpers/cart.php. Is it right? And if it is so how is it possible in the future to add some classes to those buttons?


Sorry for my English, it's not my native language.
Last edit: 7 years 7 months ago by alin.

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

  • Posts: 26232
  • Thank you received: 4035
  • MODERATOR
7 years 7 months ago #280210

Hello,

Yes, since that function in the cart helper is not more used when you're not in "legacy mode".

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.
The following user(s) said Thank You: alin

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

  • Posts: 117
  • Thank you received: 6
7 years 7 months ago #280254

I'm trying to understand on your demo site whether the classes are assigned to the "Filter" and "Reset" buttons in the filter module and to the "Add to Cart" buttons the same way - is the classes from settings are applied to the filter module buttons at all? Or the filter buttons require a separate styling? Can you check the code of original HikaShop not the demo site (I see there is a template there)?


Sorry for my English, it's not my native language.
Last edit: 7 years 7 months ago by alin.

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

  • Posts: 83780
  • Thank you received: 13570
  • MODERATOR
7 years 7 months ago #280266

Hi,

We didn't migrate these buttons to the new button system. So yes, they still use the old button display system.
If you want to change their classes you would have to edit the file "filter" of the view "product" via the menu Display>Views and change the calls from:
echo $this->cart->displayButton(...);
to:
echo str_replace('old_class_I_want_to_change','new_class_to_use_instead',$this->cart->displayButton(...));

We'll look at changing the buttons for a future release of HikaShop.

The following user(s) said Thank You: alin

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

  • Posts: 117
  • Thank you received: 6
7 years 7 months ago #280282

Thank you for the info!


Sorry for my English, it's not my native language.

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

Time to create page: 0.062 seconds
Powered by Kunena Forum