- Posts: 57
- Thank you received: 5
Button bootstrap classes, how are they applied.
12 years 9 months ago #137875
by Hristov
Button bootstrap classes, how are they applied. was created by Hristov
Hi Hika team,
I am creating a custom design for my hika product thumbs and I would like to switch the input button bootstrap classes to .btn .btn-inverse.
I am having a hard time locating the file where I can change the css class.
Originally I though that I have to edit my listing_img_title view, however the "add to cart" area contains php statements.
PHP is not my strong side at all, but I assume that the solution I am looking for is contained within this line:
<?php
if($this->params->get('add_to_cart') || $this->params->get('add_to_wishlist')){
$this->setLayout('add_to_cart_listing');
echo $this->loadTemplate();
}?>
I believe the "add_to_cart" should evaluate to true and then "loadTemplate" will call my add to cart button. In this line of thought I need to locate the file that the "echo $this->loadTemplate();" calls.
Where is this file located?
In the event I am completely wrong.
Where can I change the class of the add to cart button to be "btn btn-inverse"
Kind regards.
Drago.
I am creating a custom design for my hika product thumbs and I would like to switch the input button bootstrap classes to .btn .btn-inverse.
I am having a hard time locating the file where I can change the css class.
Originally I though that I have to edit my listing_img_title view, however the "add to cart" area contains php statements.
PHP is not my strong side at all, but I assume that the solution I am looking for is contained within this line:
<?php
if($this->params->get('add_to_cart') || $this->params->get('add_to_wishlist')){
$this->setLayout('add_to_cart_listing');
echo $this->loadTemplate();
}?>
I believe the "add_to_cart" should evaluate to true and then "loadTemplate" will call my add to cart button. In this line of thought I need to locate the file that the "echo $this->loadTemplate();" calls.
Where is this file located?
In the event I am completely wrong.
Where can I change the class of the add to cart button to be "btn btn-inverse"
Kind regards.
Drago.
Please Log in or Create an account to join the conversation.
12 years 9 months ago #137896
by nicolas
Replied by nicolas on topic Button bootstrap classes, how are they applied.
Hi,
To do that, you need to edit the file "quantity" via the menu Display>Views and change the line:
to:
To do that, you need to edit the file "quantity" via the menu Display>Views and change the line:
Code:
echo $this->cart->displayButton(JText::_('ADD_TO_CART'),'add',$this->params,$url,$this->ajax,'',$max,$min);
Code:
echo $this->cart->displayButton(JText::_('ADD_TO_CART'),'add',$this->params,$url,$this->ajax,'',$max,$min,'btn-inverse');
The following user(s) said Thank You: Hristov
Please Log in or Create an account to join the conversation.
12 years 9 months ago #137900
by Hristov
Replied by Hristov on topic Button bootstrap classes, how are they applied.
Hi Nicolas,
Thanks for your quick response. It works.
An additional question regarding the same topic.
I can definitely see in the future where I would like to create a custom add to cart button that is not based on bootstrap. However I would still like to keep the bootstrap design.
In short - keep "use bootstrap design" -> "yes", in the configuration and remove the bootstrap "btn button" classes from the "add_to_cart" button.
Thanks for your quick response. It works.
An additional question regarding the same topic.
I can definitely see in the future where I would like to create a custom add to cart button that is not based on bootstrap. However I would still like to keep the bootstrap design.
In short - keep "use bootstrap design" -> "yes", in the configuration and remove the bootstrap "btn button" classes from the "add_to_cart" button.
Please Log in or Create an account to join the conversation.
12 years 9 months ago #137907
by Jerome
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.
Replied by Jerome on topic Button bootstrap classes, how are they applied.
Hi,
I am sorry but it won't be possible unless you modify the HikaShop core.
Using the bootstrap design means using the class "btn" for the buttons, because it is the bootstrap design way.
Regards,
I am sorry but it won't be possible unless you modify the HikaShop core.
Using the bootstrap design means using the class "btn" for the buttons, because it is the bootstrap design way.
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.
Please Log in or Create an account to join the conversation.
Time to create page: 0.140 seconds