How to: see coupon fields/info only when needed?


  • Default avatar
    Mister Paul    
     4 years ago  last edited 4 years ago
    0

    Hi,


    I use the excellent AwoCoupon composant!

    :-)

    I have a question please for the Joomla/Virtuemart version:

    As I use coupons only for some categories,
    I’d like to:
    - get the coupon form field during checkout ONLY if the cart has at least a product from 1 of these catégories
    - get the coupon mentions in the invoice ONLY if the coupon has been used during checkout

    Do you know how I could make that? (and surely customize some php files…)

    Thanks for your help!
    ;-)

    Paul
  • Your avatar
    seyi    
     4 years ago
    0

    Hello,

    Sounds like you would need a developer for this type of customization.

    The coupon field is here:
    www\components\com_virtuemart\views\cart\tmpl\default_coupon.php

    unless it is overriden by your template:
    www\templates\[YOUR_TEMPLATE]\html\com_virtuemart\cart\default_coupon.php

    You can add code there to show and not show the cart in the shopping cart.