Jump to content

set product quantity to one always


Edge_jr

Recommended Posts

Hi,

 

I want to disable cart quantity increase and decrease feature and set cart quantity to always one.

 

Is it possible to achieve using back office.

 

I think I will achieve this using change in following tpl files

 

themes/order-address-product-line.tpl

themes/shopping-cart-product-line.tpl

themes/shopping-cart.tpl

themes/order-address-multishipping-products.tpl

 

Any idea?

 

-Thanks

Link to comment
Share on other sites

To make it really work, you probably need to change the add product to cart - function directly, as a customer could click twice on the add to cart as well, to get two products. You should probably find where the products is added, and there check if already one available. If so, ignore the addition... (Probably quite some work, as you also have to change the ajax-cart... ).

 

Furthermore you can easily just turn off the + and - buttons in global.css:

 

Edit themes/<your theme folder>/css/global.css:

 

find this blue string: (in my file around line 922):

.cart_quantity .cart_quantity_button {

  float: left;

  position: relative;

  top: -5px;

  display: none;    // <-- add this line

}
 
(Sample code from PrestaShop 1.5.4.1, your code may slightly differ, but the blue string should be the same, I presume)
 
My 2 cents,
pascal.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...