Cart Rules (Vouchers) Issues



  • Hi all,

    I’ve been monkeying with the cart rules and have noticed a few things:

    1. A value MUST be set for the “total available” and for “total available for each user” fields. For cart rules / vouchers that are to be automatically applied to all qualifying orders it would be ideal if these values could just be left at 0 and therefore be unlimited.
      .
      It’s not the end of the world to just set an absurdly high number for each one BUT there is no star in the BO indicating the field is required.

    2. It would be great if it was possible to use negative values with Cart Rules to apply a surcharge for certain orders. We have a situation where orders over $2000 need an extra $25 handling charge and being able to apply this as a Cart Rule would be ideal. I tried manually editing the database table to put a negative value in but when a negative value was set the Cart Rule was no longer applied.

    3. It would be great if there could be no expiry date set for Cart Rules. Again it is no problem to just set it to 2099 or some other far future date but leaving the field blank and having the rule never expire would certainly be a tidier solution.

    4. Being able to set Cart Rules discounts or surcharges based on the payment type would be a killer feature. We take bank wire payments sometimes but for orders under about $1500 we charge a $50 fee for this due to what the bank charges us.

    5. Being able to add a description for each Cart Rule that is shown to the customer would make it a lot easier for the customer to understand what discounts or fees they are paying, and why.

    I’m sure some of these things are easier to implement than others, and I’ll probably hack together the “cart rules surcharge” thing myself. Just some thoughts for things that might make cool & useful features for future versions!



  • I’ve added the ability to have Cart Rules with “negative discounts” which become surcharges at checkout.

    To do this:

    1. In the classes directory, edit CartRule.php and search for reduction_amount. Everywhere you find reduction_amount > 0 change it to reduction_amount <> 0

    2. Do the same thing again in Cart.php. There is only one location that needs to be changed in this file, at least in 1.0.3.

    3. In the /controllers/admin directory, edit AdminCartRulesController.php. Find the following three lines and comment them out by adding // to the start of each line (in 1.0.3 they are lines 246-248 of the file):

           if ((int) Tools::getValue('reduction_amount') < 0) {
              $this->errors[] = Tools::displayError('Reduction amount cannot be lower than zero.');
           }
      

    Now you can create Cart Rules with negative “discounts” that will become surcharges during the checkout process.

    Keep in mind that editing the core files is generally a bad idea and that when you update 30bz your edits will be lost. You will need to apply them again if you want to maintain this functionality.

    Of course it would be fantastic if these small changes could be included in 1.0.4… @mdekker, any thoughts?



  • Here in Japan shipments with a value exceeding 200,000yen (~$1850 USD) are now charged a $25 fee for export processing. 😞

    There have been a couple of other requests for this that I found online, like here and here so it seems I’m not the first person to hope for something like this.

    It would also be fantastic to be able to set both a minimum and a maximum price for Cart Rules, rather than only a minimum price. We will have some very small parts to sell soon (~10 cents each, for example) and would like to be able to add a handling surcharge for orders under a certain amount.

    I think the Cart Rules could become a very powerful tool with a few more options added.



  • Thanks so much for the immediate replies. It’s 6:18am here in Japan and I haven’t had any sleep yet… So I’ll be offline for a few hours. 🙂



  • I usually sleep from 5am to 9am, sometimes 10am, Japan time. Tonight things got a little out of hand and sleep time is going to be shorter than usual…



  • @dynambee said in Cart Rules (Vouchers) Issues:

    I think the Cart Rules could become a very powerful tool with a few more options added.

    Thumb up !! such things would be great, hope TB can work on this. 🤸🏾



  • IMHO, since local legislation differs from country to country it could be difficult to reflect in TB all possible modifications around the world. I’m not a programmer, but imho, it could be made as some kind of localization plugins or api?



  • @daokakao said in Cart Rules (Vouchers) Issues:

    IMHO, since local legislation differs from country to country it could be difficult to reflect in TB all possible modifications around the world. I’m not a programmer, but imho, it could be made as some kind of localization plugins or api?

    There is no need for such complexity. The Cart Rules system is fairly limited in what it is able to do and could be made much more useful with a few minor tweaks. Especially the ability to use it for surcharges (not only discounts) and the ability to set maximum values, not only minimum values.



  • @mdekker said in Cart Rules (Vouchers) Issues:

    Hmmz, interesting idea. I know that you can apply vouchers to the custom payments module and have seen changes like that before to charge extra for certain payment options. Let’s see if it’s possible to add.

    The minor changes I made to enable surcharges seem to work without any issues.

    Unfortunately it’s a little beyond my PHP/30bz knowledge to be able to add a maximum value so that discount/surcharge ranges could be created. I think it would be useful for a lot of shops to be able to offer discounts for multiple price range blocks. One discount for orders between $100 and $199.99 but a different discount for orders $200 to $499.99, etc.

    I did find a module that offers cart value ranges for discounts, among other features. I may end up purchasing it but it really does a lot more than what I need.



  • @mdekker said in Cart Rules (Vouchers) Issues:

    Do you mean bulk discount? This feature is already supported but you will have to provide specific prices for products on the product page in your admin panel.

    I mean discounts and surcharges based on the total value of the cart, in my case before shipping or tax are added.

    Such a system could be used to add a handling charge for very low value purchases. For example for a cart value of less than $10 a small handling charge could be added.

    For higher cart values a discount could be automatically given. For example if the cart value exceeds $1000 then a $50 discount, that type of thing.

    If both a minimum and a maximum value could be set then discounts for different ranges of cart totals would be possible. $500 to $999.99 = $20 off. $1000+ = $50 off, etc.

    Just adding the option of a maximum value to the Cart Rules would make it much, much more flexible.


 

Looks like your connection to thirty bees forum was lost, please wait while we try to reconnect.