Datafeedr Support Forums  

Go Back   Datafeedr Support Forums > Current Version (V3) Forum > Tips, Tricks & Tutorials
Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Important - The support forums are now in "read-only" mode as we transition to an alternative help desk solution. Feel free to contact us here with any of your questions or search the forums for an existing solution.
 
 
Thread Tools Search this Thread Display Modes
  #41  
Old March 19th, 2012, 02:03 PM
badm00n badm00n is offline
 
Join Date: Oct 2010
Posts: 39
Default

Hi Eric,

Do you know the best way I could manually coupons to the product detail pages depending on what merchant the product is coming from?

For example I would like to do if merchant=shoebuy then show the HTML for that a shoebuy coupon only. Since I only have 5 total merchants for my store, I guess there would have to 5 if statements.

Thanks.
  #42  
Old March 19th, 2012, 03:36 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Quote:
Originally Posted by badm00n View Post
Do you know the best way I could manually coupons to the product detail pages depending on what merchant the product is coming from?
What's wrong with the tutorial I posted in this thread?
  #43  
Old May 17th, 2012, 07:13 PM
billy_w billy_w is offline
 
Join Date: Mar 2011
Posts: 40
Default

If I use the code in the video only the word Coupons appear. When I use the code here I get php errors. is the &amp: supposed to be just an &. Not sure but nothing seems to work for me. I tried the product list box as well as someone with the same problem was told to use that instead of the text box but that did not fix the errors either.

Last edited by billy_w : May 17th, 2012 at 07:15 PM.
  #44  
Old May 17th, 2012, 07:57 PM
billy_w billy_w is offline
 
Join Date: Mar 2011
Posts: 40
Default

NVM I got it to work
  #45  
Old August 29th, 2012, 09:38 PM
dhilditch dhilditch is offline
 
Join Date: Feb 2012
Location: In my house
Posts: 108
Default

Hi Eric,

I need your help again

I've:

1) Created a custom view called Coupons
2) Created a hidden category called coupons
3) Added the relevant affiliate networks (the coupon ones) to my settings
4) Added the merchants to my store
5) Tried to add coupons to my hidden category
6) Modified the product list view to show the coupons (I intend to show the coupons once a user has liked the site, and it'll be a popover of some sort)

My problem seems to come at point 5 - after updating the shop and products, there are no coupons in the DB:

select * from wp_dfr_shop_products
where tags like '%coupon%'

Above returns nothing.

Also, in the actually category, it shows the subscription but not the coupons....

As I've been writing this - I've just thought - maybe it's the fact that coupons have a price of zero?
  #46  
Old August 29th, 2012, 09:45 PM
dhilditch dhilditch is offline
 
Join Date: Feb 2012
Location: In my house
Posts: 108
Default

Yes - ignore my question - I had a subscription removing zero priced products. I'll just have to get someone else to go clean up the database and remove the out-of-stock and other zero priced products manually.
  #47  
Old August 30th, 2012, 08:42 AM
dhilditch dhilditch is offline
 
Join Date: Feb 2012
Location: In my house
Posts: 108
Default

Hi - I'm still having issues with coupons here:

http://www.fitness-saver.com/uk/shop/cycling/

1) I have successfully created the coupon view and am getting coupons to appear on the page in a popover
2) The following shortcodes don't work from within my view:

[coupon.code]
[coupon.ends]

The following is the only one that works:
[product.name]

Is there something I'm doing wrong?
  #48  
Old August 30th, 2012, 09:21 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

Can you PM me the following information:

BLOG LOGIN INFO with ADMINISTRATOR PERMISSIONS (Temporary login information preferred)
Admin URL:
Username:
Password:

Thanks,
Eric
  #49  
Old August 30th, 2012, 09:31 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Quote:
Originally Posted by dhilditch View Post
Hi - I'm still having issues with coupons here:

http://www.fitness-saver.com/uk/shop/cycling/

1) I have successfully created the coupon view and am getting coupons to appear on the page in a popover
2) The following shortcodes don't work from within my view:

[coupon.code]
[coupon.ends]

The following is the only one that works:
[product.name]

Is there something I'm doing wrong?
Actually, can you try these PHP variables first:

PHP Code:
$s->coupon_info($product'code');
$s->coupon_info($product'end'); 
  #50  
Old August 30th, 2012, 10:14 AM
dhilditch dhilditch is offline
 
Join Date: Feb 2012
Location: In my house
Posts: 108
Default

Hi Eric,

This didn't help. I tried variations too:

<?echo $s->coupon_info($product->id, 'code'); ?>

It's odd that [product.name] and [product.merchant] work but [product.description] returns 0 - if that were working I could run some split code over the coupon description like this I think:

<?php
$coupontokens = split(";", str_replace("]", "", str_replace("[", "", $product->description)));
$couponends = split(":", $coupontokens[1])[1];
$couponcode = split(":", $coupontokens[2])[1];

?>
  #51  
Old August 30th, 2012, 10:16 AM
dhilditch dhilditch is offline
 
Join Date: Feb 2012
Location: In my house
Posts: 108
Default

I guess another plan could be for me to simply write a function in functions.php that queries the database for the 'merchant' name and the correct category for coupons.

That, I am sure, would work as I can see the coupons in the database with the expires, begins, code etc all contained within the 'description' column.

Dave
  #52  
Old August 30th, 2012, 10:18 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

To be honest, I'm surprised any products are being returned at all because nothing is being passed in the Datafeedr query string for that view.

You might have better luck running a custom query.
  #53  
Old August 30th, 2012, 10:26 AM
dhilditch dhilditch is offline
 
Join Date: Feb 2012
Location: In my house
Posts: 108
Default

Ok thanks - I guess it's because I'm trying to display the coupons in the product list rather than product details?
  #54  
Old August 30th, 2012, 11:40 AM
dhilditch dhilditch is offline
 
Join Date: Feb 2012
Location: In my house
Posts: 108
Default

I'm running into an issue since the 'description' column in DataFeedr for the coupons contains something like:

[begins:02/08/2012; ends:02/09/2012; code: WIGG10]

But I'm not seeing that in the database? This makes it impossible for me to write a custom function to do this. Any ideas where this data is going?

Dave
  #55  
Old August 30th, 2012, 11:46 AM
dhilditch dhilditch is offline
 
Join Date: Feb 2012
Location: In my house
Posts: 108
Default

Also - is there a function like this:

AddReferrer(url, merchantid) // ideally something like this which transforms the DB url field into one containing the right referrerid for the affiliate network?
  #56  
Old August 30th, 2012, 12:08 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi
Quote:
Originally Posted by dhilditch View Post
I'm running into an issue since the 'description' column in DataFeedr for the coupons contains something like:

[begins:02/08/2012; ends:02/09/2012; code: WIGG10]

But I'm not seeing that in the database? This makes it impossible for me to write a custom function to do this. Any ideas where this data is going?
That data is in the products table in the description column.

Quote:
Originally Posted by dhilditch View Post
Also - is there a function like this:

AddReferrer(url, merchantid) // ideally something like this which transforms the DB url field into one containing the right referrerid for the affiliate network?
There's no function but a simple str_replace should work. Here's the PHP for the referrer:
PHP Code:
$referrer_id intval(@$_COOKIE['stortrak']); 
PHP Code:
str_replace("REFERRER_ID"$referrer_id$product->url); 
Eric


Eric
  #57  
Old August 30th, 2012, 12:16 PM
dhilditch dhilditch is offline
 
Join Date: Feb 2012
Location: In my house
Posts: 108
Default

Cool - thanks.

I'm re-running my store update as all I have is 0 contained in the description column for the coupons. Probably this is where the problem comes from in the first place!
  #58  
Old September 5th, 2012, 05:06 AM
dhilditch dhilditch is offline
 
Join Date: Feb 2012
Location: In my house
Posts: 108
Default

FYI, this was my fault - have fixed - thanks for help.
  #59  
Old October 25th, 2012, 08:47 AM
dhilditch dhilditch is offline
 
Join Date: Feb 2012
Location: In my house
Posts: 108
Default

I've written a free guide with everything I learned about adding coupons to the product detail page here:

http://www.affiliatewebdesigners.com...-to-datafeedr/

Maybe someone will find it useful.
  #60  
Old November 30th, 2012, 08:08 PM
george3 george3 is offline
 
Join Date: Oct 2012
Posts: 34
Default

Worked Great ,How about maybe widget coupons?
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:57 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.