- Posts: 57
- Thank you received: 5
Add quantity increment and decrement buttons
12 years 4 weeks ago #170541
by Hristov
Add quantity increment and decrement buttons was created by Hristov
-- url of the page with the problem -- : localhost
-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.3
-- PHP version -- : 5.4
Hi Hika team,
I'm trying to add the quantity increment and decrement buttons to the checkout form. (views/cart.php)
I copied the two buttons from show_quantity.php but they don't work.
I added this bit to cart.php as well expecting it to magically start working, but of course it didn't.
How far from the truth am I?
One more question - what does the $i variable do?
Kind regards,
Drago.
-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.3
-- PHP version -- : 5.4
Hi Hika team,
I'm trying to add the quantity increment and decrement buttons to the checkout form. (views/cart.php)
I copied the two buttons from show_quantity.php but they don't work.
I added this bit to cart.php as well expecting it to magically start working, but of course it didn't.
Code:
$i =$this->params->get('i');
$min_quantity =$this->params->get('min_quantity');
$max_quantity =$this->params->get('max_quantity');
$html =$this->params->get('html');
How far from the truth am I?
One more question - what does the $i variable do?
Kind regards,
Drago.
Please Log in or Create an account to join the conversation.
12 years 3 weeks ago #170591
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Add quantity increment and decrement buttons
Hi,
The view "checkout | cart" does not use the view "product | show_quantity" to display the quantity field.
It provides two different "layout", a simple text box or a drop down list.
If you want to extend the features in that view, you will have to add more content and import some elements from the view "show_quantity" into the checkout cart view.
And you will find the content of " params->get('html') " in the HikaShop cart class, at the beginning of the function "displayButton".
Regards,
The view "checkout | cart" does not use the view "product | show_quantity" to display the quantity field.
It provides two different "layout", a simple text box or a drop down list.
If you want to extend the features in that view, you will have to add more content and import some elements from the view "show_quantity" into the checkout cart view.
And you will find the content of " params->get('html') " in the HikaShop cart class, at the beginning of the function "displayButton".
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
11 years 5 months ago #200959
by maujbigo
Replied by maujbigo on topic Add quantity increment and decrement buttons
Hi, Is there a tutorial on how to do this?
I also would like to add the + - buttons to the checkout products.
I copied the link/buttons from "show_quantity" into the cart/checkout. I also copied the params->get('html') variable from the top of the "show_quantity" and pasted on the top of cart/checkout, but no lucky.
They appear fine but when I click it there is no action. I just takes me to the top of the page. And no effect to the product quantity input field it self.
Thanks
I also would like to add the + - buttons to the checkout products.
I copied the link/buttons from "show_quantity" into the cart/checkout. I also copied the params->get('html') variable from the top of the "show_quantity" and pasted on the top of cart/checkout, but no lucky.
They appear fine but when I click it there is no action. I just takes me to the top of the page. And no effect to the product quantity input field it self.
Thanks
Please Log in or Create an account to join the conversation.
11 years 5 months ago #200976
by Xavier
Replied by Xavier on topic Add quantity increment and decrement buttons
Hi,
The easiest solution will be to use javascript, onclick on the + or - button in order to update the input field based on its id or via jQuery pointers.
So it require some Javascript / jQuery knowledges.
The easiest solution will be to use javascript, onclick on the + or - button in order to update the input field based on its id or via jQuery pointers.
So it require some Javascript / jQuery knowledges.
Please Log in or Create an account to join the conversation.
Time to create page: 0.186 seconds