Jump to content

Recommended Posts

Hi there,

 

Just wanted to see if anyone knows of a way to make prestashop 1.6 discount codes uncombinable by default?

 

I'm aware that I can manually make each code uncombinable in the compatibility conditions section or do a mass change on the database but I was hoping there would be a way to make it so it is uncombinable by default as this is the preferred state for 99% of my discount codes. That way if I wish to allow combinations I can and there is a much reduced risk of discounts being combinable when they shouldn't be.

 

Feel free to ask any questions you might have regarding this and I appreciate any input you can give on the matter.

 

Link to comment
Share on other sites

open file:
ADMIN_DIR/themes/default/template/controllers/cart_rules/conditions.tpl

 

search for:
 

<input type="checkbox" id="cart_rule_restriction" name="cart_rule_restriction" value="1" {if $cart_rules.unselected|@count}checked="checked"{/if} />

and change it to:
 

<input type="checkbox" id="cart_rule_restriction" name="cart_rule_restriction" value="1" checked="checked" />

and this option will be automatically selected

  • Confused 1
Link to comment
Share on other sites

This certainly helps to make it clear that these need to be adjusted so thank you very much for that but it's not quite what I was looking for.

 

I was hoping to have the cart rules themselves automatically in the uncombinable select area rather than the combinable one their normally in so if someone was to make a discount code and not adjust this section at all it would follow the uncombinable rule.

Link to comment
Share on other sites

  • 2 years later...
On 1/2/2016 at 4:59 AM, vekia said:

open file:
ADMIN_DIR/themes/default/template/controllers/cart_rules/conditions.tpl

 

search for:
 


<input type="checkbox" id="cart_rule_restriction" name="cart_rule_restriction" value="1" {if $cart_rules.unselected|@count}checked="checked"{/if} />

and change it to:
 


<input type="checkbox" id="cart_rule_restriction" name="cart_rule_restriction" value="1" checked="checked" />

and this option will be automatically selected

 

Hi Vekia,

I want same functionality which cyanoxide want.

I am using Prestashop 1.7.2.2. And want to select all cart rule in an Uncombinable select box instead of a combinable select box while adding new cart rule.

I changed in prestashop/admin928iq35ay/themes/default/template/controllers/cart_rules/form.js line number 482 & 483

$('#cart_rule_select_1').jscroll().data('jscrollapi').load_scroll(baseHref+'&type=unselected&search=');
$('#cart_rule_select_2').jscroll().data('jscrollapi').load_scroll(baseHref+'&type=selected&search=');

to 

$('#cart_rule_select_1').jscroll().data('jscrollapi').load_scroll(baseHref+'&type=selected&search=');
$('#cart_rule_select_2').jscroll().data('jscrollapi').load_scroll(baseHref+'&type=unselected&search=');

 

It select all cart rule in an Uncombinable select box. But, after saving it will in a Combinable box.

Edited by chirag_0110 (see edit history)
Link to comment
Share on other sites

  • 1 month later...
On 02/01/2016 at 12:29 AM, vekia said:

open file:
ADMIN_DIR/themes/default/template/controllers/cart_rules/conditions.tpl

 

search for:
 


<input type="checkbox" id="cart_rule_restriction" name="cart_rule_restriction" value="1" {if $cart_rules.unselected|@count}checked="checked"{/if} />

and change it to:
 


<input type="checkbox" id="cart_rule_restriction" name="cart_rule_restriction" value="1" checked="checked" />

and this option will be automatically selected

 

On 02/01/2016 at 12:29 AM, vekia said:

open file:
ADMIN_DIR/themes/default/template/controllers/cart_rules/conditions.tpl

 

search for:
 


<input type="checkbox" id="cart_rule_restriction" name="cart_rule_restriction" value="1" {if $cart_rules.unselected|@count}checked="checked"{/if} />

and change it to:
 


<input type="checkbox" id="cart_rule_restriction" name="cart_rule_restriction" value="1" checked="checked" />

and this option will be automatically selected

 

This is not for what he is asking for, when you create a new cart rule, they automatically gets combined is there a way to have it so they are uncombined as default, i also deal with alot of vouchers and i have a module that create them automatically, and having to go everytime to uncombining them is time consuming imagine having to do that to 1000 voucher a day. what a joke 

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...