Show the Coupon discount tax and amount in the cart and invoice when the amount is zero.


  • Default avatar
    Jack Schuurkes    
     8 years ago
    0

    Hello Seyi,

    Where can I change the setting that the coupon code with a zero amount is displayed/shown in the cart like:

    coupon code text                           coupon tax amount                          coupon amount.

    The cart shows at this moment only the coupon description after the coupon field.

    I'm using:

    1. Joomla 3.6.4
    2. Virtuemart 3.0.16
    3. AwoCoupon Pro 2.5.1

    Best regards, Jack

  • Your avatar
    seyi    
     8 years ago
    0

    Hello,

    It does not show the discount amount?  If so, I think you just need to adjust the template.  It would be in the file:

    www/templates/[YOUR_TEMPLATE]/html/com_virtuemart/cart/default_pricelist.php

    If you do not have that file, then copy this file there and adjust:

    www/components/com_virtuemart/views/cart/tmpl/default_pricelist.php
  • Default avatar
    Jack Schuurkes    
     8 years ago  last edited 8 years ago
    0

    Hello,

    The default_pricelist.php of my template shows the next lines about the coupon code:

    <table class="cart-summary" cellspacing="0" cellpadding="0" border="0" width="100%">

    <?php
    </p><p>if (VmConfig::get ('coupons_enable')) {</p><p><span class="Apple-tab-span" style="white-space:pre;">    </span>
    ?>

    <tr class="sectiontableentry2">

    <td>

    <?php
     
    if (!empty($this->layoutName) && $this->layoutName == 'default') {</p><p><span class="Apple-tab-span" style="white-space:pre;">    </span>// echo JHTML::_('link', JRoute::_('index.php?view=cart&task=edit_coupon',$this->useXHTML,$this->useSSL), JText::_('COM_VIRTUEMART_CART_EDIT_COUPON'));</p><p><span class="Apple-tab-span" style="white-space:pre;">    </span>echo $this->loadTemplate ('coupon');</p><p>}</p><p><span class="Apple-tab-span" style="white-space:pre;">    </span>
    ?>


    <?php
     
    if (!empty($this->cart->cartData['couponCode'])) { 
    ?>

    <?php
    </p><p><span class="Apple-tab-span" style="white-space:pre;">    </span>echo $this->cart->cartData['couponCode'];</p><p><span class="Apple-tab-span" style="white-space:pre;">    </span>echo $this->cart->cartData['couponDescr'] ? (' (' $this->cart->cartData['couponDescr'] . ')') : '';</p><p><span class="Apple-tab-span" style="white-space:pre;">    </span>
    ?>


    </td>


    <?php
     
    if (VmConfig::get ('show_tax')) { 
    ?>

    <td align="right">

    <?php
     
    echo $this->currencyDisplay->createPriceDiv ('couponTax'''$this->cart->pricesUnformatted['couponTax'], FALSE); 
    ?>
    </td>

    <?php
     

    ?>

    <td align="right">

    <?php
     
    if($this->cart->pricesUnformatted['salesPriceCoupon'] < 0) echo $this->currencyDisplay->createPriceDiv ('salesPricePayment'''$this->cart->pricesUnformatted['salesPriceCoupon'], FALSE); 
    ?>
    </td>

    <td align="right">

    <?php
     
    echo $this->currencyDisplay->createPriceDiv ('salesPriceCoupon'''$this->cart->pricesUnformatted['salesPriceCoupon'], FALSE); 
    ?>
    </td>

    <?php
     
    } else { 
    ?>

    <td colspan="6" align="left">&nbsp;</td>

    <?php
    </p><p>}</p>
    <
    p><span class="Apple-tab-span" style="white-space:pre;">    </span>
    ?>

    </tr>

    <?php
     

    ?>

    </table>


    Where should I change something??

    If I use a coupon with an amount greater then zero, it displays the coupon price line, but with a zero amount it does not show the line.

    Thanks for your support,

    Jack


    Hi Seyi,

    I've searched my whole Joomla installation, but I cannot find the place where the coupon line with a zero amount and zero tax will be rejected from being displayed in the cart and the invoice.

    When I enter an amount of 0.01 euro in the coupon, then it's working.

    The other problem I have, is that when I have a coupon with a value > then zero, the coupon tax is not reduced form the total tax?

    Please help, because the site has to go live in a short time.

    Should I send you my credentials to take a look at my site. You could also take a look at my test site www.emeraldwebdesign.nl/Winkel and go to

    the menu (after pushing the button "bestellen" ) and select "Waardebon"

    There you have 3 options, Fototaart, Kaneelkoek, Zwemvlaai

    Fototaart has 7.00 euro discount

    Kaneelkoek has 0.00 euro discount

    Zwemvlaai has 0.01 euro discount.

    Please contact me by email if you need more info,


    Jack



  • Your avatar
    seyi    
     8 years ago
    0

    Hello,

    Just looked at the site and you are using some type of one page extension.  This means the file I mentioned above will not work.  You will need to modify the one page extension directly.

    But to be honest I do not believe I understand the problem.  Are you saying that coupons with normal discount show fine, but coupons with 0 discount do not? It only shows the coupon code?  This would have to be edited in the checkout extension directly.

    For coupon tax, did you set up discount before tax in awocoupon->configuration?
  • Default avatar
    Jack Schuurkes    
     8 years ago  last edited 8 years ago
    0

    Hello Seyi,

    I want to send you an email with some screenshots, but in the private message to you there is no option to include screenshots??

    Thanks, Jack

    If you send me an email I can respond to you with my screenshots.

    My email address is : jack.schuurkes@me.com

    Thanks for your support.

    Jack


    Hello Seyi,

    Of course, I asked the same question at the virtuemart forum.

    Please take a look.

    https://forum.virtuemart.net/index.php?topic=135902.new;topicseen#new

  • Your avatar
    seyi    
     8 years ago
    0

    Hi,

    I sent you a private message.