AWO Coupon Display Text being saved to virtuemart orders table as coupon_code


  • Default avatar
    simon82    
     4 days ago  last edited 4 days ago
    0

    On Joomla 5.4.1 with Virtuemart 4.6.4 11226, VP One Page Checkout 7.35 and Awocoupon 4.1.0.1.
    When an AWOCoupon is applied to an order and has display text set for it, upon placing the order the display text will be passed to the virtuemart_orders table as the coupon_code entered.
     
    I've gone into the administrator component where the coupon discounts are handled in component/com_awocoupon/awocoupon/library/class-awocoupon-library-discount.php on line 4457 and  the coupon_code session parameter is being set to an imploded version of the $coupon_codes_noauto array, which is just an array of the various display texts.


    Now in the course of testing it turns out by switching the 'coupon_code' entry from 'coupon_code'=> implode(', ', $coupon_codes_noauto), to 'coupon_code'=>implode(', ', $coupon_codes) it resolves the issue and the proper set of coupon cods get passed to the virtuemart_orders table. Doing this does not harm the display of the associated display text in the checkout. 

    Simply updating the way I described above, and passing the cumulative display text as coupon_display_text, rather than passing it as coupon_code, which virtuemart is expecting for the order system, resolves the entire issue

  • Default avatar
    simon82    
     a day ago
    0

    Again, the issue is how the display text is currently being saved handled. By saving it as the coupon_code param to the virtuemart session, You're setting up the virtuemart plugin to put the display text into the virtuemart_orders table as the coupon_code.
  • Your avatar
    seyi    
     13 hours ago
    0

    Hello,

    The display text feature is to be shown to the user once the coupon code is entered in the cart and in the invoices, emails..etc.  So yes, it is added to the vm order table.  It is not an issue, it was intended that way.
  • Default avatar
    simon82    
     9 hours ago  last edited 9 hours ago
    0

    Okay, is there any easy way we can reliably display the actual coupon code on the administrative side then?