Shipping discount AND product discount


  • Default avatar
    evert7    
     12 years ago
    0

    I made up two coupons:

    Function Type: Coupon
    Function Type 2 : Categorie
    Percent
    Discount Type : Specific
    Value Definition: 5-10;8-15;Apply Distinct Count

    Function Type: Coupon
    Function Type 2 : Shipping
    Amount
    Value: 17.85000
    Optional Fields
    Minimum Value: 100.00

    I made up a parent coupon, added both coupons and choose 'all that apply' for Process Type.

    The problem is that if the first coupon not match with the products in the card, the second one doesn't work eather.
    How can i fix that?
  • Your avatar
    seyi    
     12 years ago
    0

    are you sure its not set to 'only if all apply'?

    if not try testing the coupons separately and using awocoupon->configuration->error messages to figure out why its not working.
  • Default avatar
    evert7    
     12 years ago
    0

    First I could not find that option. I updated the component and there it was. It was selected.
    I tried testing the coupons separately, and than I found out that the shipping coupon is not working. The option to apply a shipping coupon before selecting a shipping method was selected. But as soon I enter the coupon en hit the button the website jumps back to the step in the virtuemart checkout process after entering your adress.

    you can see it at reanty.usablecopy.nl. Order at least for €100.00 and for postcode choose value 3072.
  • Your avatar
    seyi    
     12 years ago
    0

    it will be fixed on the next update:
    https://awodev.com/forum/awocoupon/help-section/urgent-shipping-coupon-dont-work#comment-2415
  • Default avatar
    evert7    
     12 years ago
    0

    I applied the hack on https://awodev.com/forum/awocoupon/help-section/urgent-shipping-coupon-dont-work#comment-2415.
    Now the shipping coupon works, but when I activate the Parent coupon and the basket does not match the rules for one of the child coupons, they don't work at all.
    And the checkout process still jumps back to the page step after inserting the account details.
  • Your avatar
    seyi    
     12 years ago
    0

    To summarize:
    - If you apply each coupon singularly to the same order, does it work?
    - once each coupon is put in a parent coupon, it does not work
    - for parent coupon, the process type is 'all that apply'

    For this "And the checkout process still jumps back to the page step after inserting the account details." That sounds like a virtuemart problem, AwoCoupon does not have anything to do with users entering their account details.
  • Default avatar
    evert7    
     12 years ago
    0

    Both coupons work seperately. As soon as the basket match the rules for the shipping account the parent coupon does not work.

    The process typ is all that apply.

    The jump back to the page after inserting the account details happens as soon you enter the coupon code and the rules for the shipping account match the basket.

    Do you need screenshots?
  • Your avatar
    seyi    
     12 years ago
    0

    that would be helpful. maybe you could provide a screenshot of your coupon code setups so I can try and reproduce it exactly locally.
  • Default avatar
    evert7    
     12 years ago
    0

    That could make it cleare.

    The screenshots are here:
    http://dl.dropbox.com/u/17866393/Awo%20coupons/Parent-coupon.JPG
    http://dl.dropbox.com/u/17866393/Awo%20coupons/Category-coupon.JPG
    http://dl.dropbox.com/u/17866393/Awo%20coupons/Shipping-coupon.JPG

    Thanks
  • Your avatar
    seyi    
     12 years ago
    0

    Ok, I tested the exact coupons locally and everything worked, including the parent coupon, using AwoCoupon 1.4.3.

    I will be happy to take a look at your site if you can provide temp admin/ftp access through PM.
  • Your avatar
    seyi    
     12 years ago
    0

    Ok, I took a look and the problem is specific to parent coupons, where shipping coupons are not accepted when a shipper has not been selected. To fix this:

    in www/administrator/components/com_awocoupon/assets/virtuemart/ps_coupon_process.php around line 318 is this:
    <?php
        
    if(!empty($row['product_discount']) || !empty($row['shipping_discount'])) {
    ?>


    Alter it to this
    <?php
        
    if(!empty($row['force_add']) || !empty($row['product_discount']) || !empty($row['shipping_discount'])) {
            if(!empty(
    $row['force_add'])) $return['force_add'] = 1;
    ?>


    And around line 335 is this:
    <?php
        
    if(!empty($return['product_discount']) || !empty($return['shipping_discount'])) {
    ?>


    Change it to this
    <?php
        
    if(!empty($return['force_add']) || !empty($return['product_discount']) || !empty($return['shipping_discount'])) {
    ?>


    That should solve the problem. Will be fixed on the next update.
  • Default avatar
    evert7    
     12 years ago
    0

    Thanks alot! It works now.

    One issue remains, when checking the coupon at checkout step 3, the checkout proces jumps back to step 1.

    But still happy with the solution so far.
  • Your avatar
    seyi    
     12 years ago
    0

    Good to hear its working. By default Virtuemart pushes you back to step1, AwoCoupon code is actually what keeps you in step 3. Viewing your code, you are missing
    <input type="hidden" name="checkout_this_step[]" value="CHECK_OUT_GET_SHIPPING_METHOD" />

    in your form.

    Since your coupon field is customized, take a look at the user_guide.html in your download at section 5.1.2 Add Shipping fields to Coupon Form, and add the code there into your coupon form.
  • Your avatar
    seyi    
     12 years ago
    0

    updated in 1.4.4