Hide coupon field based on product id?

Discussion in 'Customization & add-ons' started by rsigcourses, Apr 17, 2012.

  1. rsigcourses

    rsigcourses Member

    Joined:
    Mar 8, 2011
    Messages:
    46
    Using 3.x

    Is it possible to hide the coupon field based on a product_id?

    I've tried a variety of code, but can't get anything to work. I think the simpliest solution since its just going to be one product that we need to hide it for would have been something like

    {if $config.use_coupons || $p.product_id !=52}

    but no dice! Any tips or suggestions appreciated
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    You can do this using price groups only.
    For example:

    {if $config.use_coupons && ($smarty.request.price_group!=-1)}
  3. rsigcourses

    rsigcourses Member

    Joined:
    Mar 8, 2011
    Messages:
    46
    Awesome, that will work.

    Thanks a million!

Share This Page