You are here:  » Virtual Vouchers


Virtual Vouchers

Submitted by babyuniverse on Fri, 2019-02-15 23:37 in

Hi David,

Is there any way you display the voucher codes on the virtual results?

My setup is as follows.

Post Name = Merchant Name
I am using shortcode [pto featured="merchant:180 Nutrition:10"] in the post to return featured products relating to that merchant

This merchant 180 Nutrition also has some voucher codes, is there a way to use a shortcode to display the voucher codes. These would appear above or below the featured products in a similar style

I was imagining similar to {link saved} but merged into the wordpress post.

An example of a post is {link saved}

Any suggestions?

Thanks
Richard

Submitted by support on Mon, 2019-02-18 10:20

Hi Richard,

I'll look shortly at incorporating the complete voucher code functionality into the plugin - currently it is supported at integration level 2 ($config_useVoucherCodes=2) where discounts are applied to the price at import time and the voucher code displayed on the product page.

However, just to reply quickly now if you have modified pto_featured.php so that the Featured Products are direct to merchant instead of to the product page then it is no problem to add the voucher code to the display in the same format as the product page - "(using voucher ABCD1234)". To do this, look for the following code at line 145:

         $each = str_replace("%PRICE%",$pto_config_currencyHTML.$row->minPrice,$each);

...and REPLACE with:

        $priceHTML = $pto_config_currencyHTML.$row->minPrice;
        if ($row->voucher_code)
        {
          $priceHTML .= "<br />(using voucher code <strong>".$row->voucher_code."</strong>)";
        }
        $each = str_replace("%PRICE%",$priceHTML,$each);

Cheers,
David.
--
PriceTapestry.com

Submitted by babyuniverse on Sat, 2019-02-23 00:38

Thanks mate.

Im using [pto featured="merchant:180 Nutrition:10"] to bring back only 10 random products from about 2000 in the feed. Would I assume that the voucher would appear randomly? I have added the code above and so far cannot see the voucher appearing in featured

Submitted by support on Mon, 2019-02-25 08:45

Hi Richard,

If you have the main plugin page enabled (/shopping) if you could go to a product that you know should have a voucher code applied and check that the voucher code is shown in the price comparison table - if that's the case then is may be that vouchers don't apply to all 2000 products.

If the voucher code doesn't appear on the product page, double check that integration level 2 is enabled as follows at line 41 of config.advanced.php in the associated Price Tapestry installation;

  $config_useVoucherCodes = 2;

...and that a full import has been made since enabling / adding or changing voucher codes (also worth browsing to vouchers.php in the associated Price Tapestry installation to check that everything appears there as expected)...

Once you've confirmed that vouchers are being imported expected (or otherwise of course!), if you could email me your modified pto_featured.php I'll check it out further with you...

Cheers,
David.
--
PriceTapestry.com

Submitted by babyuniverse on Sat, 2019-03-02 04:40

Hi David,

I must be confused with how vouchers work, I was expecting to show them on each store page

If you look at {link saved} you will see a manually coded voucher near the bottom.

I have 1 test voucher at {link saved} for a store called 180 Nutrition and I would like to show it in that format with the featured products.

A mockup of what I am trying to achieve is at {link saved}

I dont need to apply the voucher to the existing featured products, just show it as its own featured product.

Thanks
Richard

Submitted by support on Sat, 2019-03-02 11:40

Hi Richard,

The intention of the voucher code functionality in Price Tapestry is to actually apply the discounts to the prices so that that they can be considered in the price comparison. If you go to the /PT/vouchers.php that you linked to, and then click View Products there are currently no results so the code doesn't apply to anything as currently configured.

If you want a code to apply to all products you can leave Minimum Spend as 0.00, re-import and you should then find that View Products shows all products for that merchant with the discount applied, and the mods above should reveal the code in the plugin.

If the code doesn't seem to be getting applied as expected let me know and I'll check it out further with you, but it would also be possible to create something like the mock-up you created driven from the database - it would depend on what you want to link to - there are various voucher code functionality mods on the Price Tapestry forum for example Add a field for voucher link which might be of interest...

Cheers,
David.
--
PriceTapestry.com