awocoupon in Shipping mode, one page checkout, display discount in summary


  • Default avatar
    bthorud    
     12 years ago
    0

    Hi I have bought and implemented the module for a client, it works fine, but cant get it to display the discount in the cart before confirming the order.

    My client will basically use this to give away coupons for free shipping. No problem, set up a shipping coupon with % and value 100.
    So it works, BUT, the customers are a bit confused because after entering the coupon code, it does not show that its activated anywhere until you click "confirm order" (yes, its a one page checkout). There is only one shipping option based on the standard shipping module. Is there any other way for the system to calculate and display the discount when the page is reloaded after entering the coupon code ? If not, is there a way to display that the coupon code is entered correctly, either with some info text , i.e "coupon code accepted , discount will be added after order is confirmed" ?


    Tks.
  • Your avatar
    seyi    
     12 years ago
    0

    Hello,

    Are you using a specific extension for opc or just Virtuemart? In order to have the discount displayed on a one page checkout, it would seem there would have to be some ajax involved. First the coupon is accepted, the address is selected, the shipping is displayed, the shipping is selected, and at this point the ajax would kick in to show the discount. The only other way would be to break it into different pages.

    For showing that a coupon has been accepted, you could try adding a system message within AwoCoupon in
    www/administrator/components/com_awocoupon/helpers/vm_coupon, around line 411 is this
    <?php
    if($this->finalize_coupon($master_output)) return true;
    ?>


    change it to something like this
    <?php
    if($this->finalize_coupon($master_output)) {
        
    JFactory::getApplication()->enqueueMessage('coupon accepted');
        return 
    true;
    }
    ?>
  • Default avatar
    bthorud    
     12 years ago
    0

    Not using any extension, its done as easy as selecting all checkout steps to 1 in the virtuemart config.

    Was hoping that as long as there was only one shipping method .. and this is selected by default it could calculate
    and display the discount when the code was entered, but this is a great workaround !
    Works great, edited the text to say "code accepted, coupons for shipping discounts are calculated after order is confirmed."

    That should explain it to the coustomer :-)

    Thanks for great help !!