AwoCoupon's Gift Certificates - how to change value display from 50.00 USD to $50.00?


  • Default avatar
    richard52    
     10 years ago
    0

    I have AwoCoupon Pro 2.2.5 installed with Virtuemart 2.0.26d and Joomla 2.5.18.

    We are selling gift certificates with a custom image background. The value is written to the gift certificate and displayed as "50 USD". I would like to change that display to "$50.00" (remove USD at the end and add $ before the value number). I searched the forum and found a couple suggestions from 2010 and 2011, but they refer to hacking files that don't exist in my version of AwoCoupon Pro. Can you suggest how I can accomplish this?

    I figured out how to edit this for the backend preview by editing administrator/com_awocoupon/controller.php line 783 and 798
    Change
    $image = awoLibrary::writeToImage('ABSIE@SD12bSeA','25.00 USD',1262304000,'screen',$profile);

    to
    $image = awoLibrary::writeToImage('ABSIE@SD12bSeA','$25.00',1262304000,'screen',$profile);


    But this only changes the preview, not the actual gift certificate that is emailed to customers.

    Thanks,
    Richard
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    Can you examine the image you set up more closely? Because in AwoCoupon 2, if you the "value" line is displayed in the image, the currency is correctly formated: $50.00.
  • Default avatar
    richard52    
     10 years ago
    0

    I see. I didn't actually purchase a gift certificate yet to check the process. I've only seen the preview in the admin backend and thought it was the same for the live gift certificates. Now that I have everything configured and displaying on the frontend, I'll make a copy of the site on my computer and run some purchase tests through PayPal Sandbox to make sure everything is working as it should - emails sent and certificate redemption, etc. Does that sound like the best way to test AwoCoupon Pro, or do you have another suggestion?

    Thanks, Richard
  • Your avatar
    seyi    
     10 years ago
    0

    Ok, yes, the testing sounds good. If using virtuemart 2.0.26, make sure you read and add the code from this forum:
    https://awodev.com/forum/awocoupon/help-section/virtuemart-2026-coupon-usage-not-being-recorded
  • Default avatar
    richard52    
     10 years ago
    0

    Oh, thank you thank you! I am using VM 2.0.26d and was not aware of that issue before you mentioned it. That saved me big headache!!

    Richard
  • Default avatar
    richard52    
     10 years ago
    0

    Seyi

    I'm using Virtuemart 2.0.26d, just had a look at components/com_virtuemart/helpers/coupon.php to add your hack code as directed, but it looks like there is similar code already added at line 115. There's even a comment addressed to you next to that code. Have a look:

        static public function RemoveCoupon($_code, $_force = false)
        {
            JPluginHelper::importPlugin('vmcoupon');
            $dispatcher = JDispatcher::getInstance();
            $returnValues = $dispatcher->trigger('plgVmRemoveCoupon', array($_code, $_force));
            if(!empty($returnValues)){
                foreach ($returnValues as $returnValue) {
                    if ($returnValue !== null  ) {
                        //Take a look on this seyi, I am not sure about that, but it should work at least simular note by Max
                        //$couponData = $returnValue;
                        return $returnValue;
                    }
                }
            }


    Perhaps we no longer have to hack the VM code as recommended in this post? https://awodev.com/forum/awocoupon/help-section/virtuemart-2026-coupon-usage-not-being-recorded

    What do you think?
    Richard
  • Default avatar
    richard52    
     10 years ago
    0

    I just realized, I already set my license to permanent. Will I be able to make a copy of the site, install it locally on MAMP, and text Gift Certificate functions via PayPal Sandbox. Or will AwoCoupons not work on MAMP because it's not on the licensed domain?

    Richard
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    The code in function RemoveCoupon has always been there. You need to add the code to function setInUseCoupon.