View Single Post
  #2  
Old October 21st, 2012, 09:19 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

The first step is to obtain the product record. If product ID is 789502110370127:

PHP Code:
$product dfr('products')->get('789502110370127'); 
If the code is in a [product] block, you can omit this step, since the $product variable is already available.

Then, there's a function "dfr('app')->url(kind, product)" that returns different kinds of urls for a specific product

PHP Code:
dfr('app')->url('image'$product); //returns something like "/store/image/789502110370127/18-piece-bbq-set/"
dfr('app')->url('thumbnail'$product); // similar for a thumbnail
dfr('app')->url('click'$product); // returns "store/product/buy/789502110370127/18-piece-bbq-set/" 
And finally, $product object properties contain direct merchant urls.

Eric