Datafeedr Support Forums  

Go Back   Datafeedr Support Forums > Current Version (V3) Forum > Questions
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
Old April 18th, 2012, 07:21 AM
crazysaver crazysaver is offline
Join Date: Mar 2012
Posts: 47
Default Brand and Merchant Variables in PHP

Hi - I'm working on improving the related products at the bottom of my product details pages.

So far, I've included
'Other []'
and then use

[DFR:CustomView?c=<?php echo $category->id ?>]

to display a small set of alternate products.

I need access to the brand and merchant variables too and the product description and product name all from PHP rather than using shortcodes.

I tried guessing at $brand->name but it didn't work.

Is there anywhere that lists these PHP variables too?
Old April 18th, 2012, 07:24 AM
crazysaver crazysaver is offline
Join Date: Mar 2012
Posts: 47

Also, it would be useful if I could access the price as well.
Old April 18th, 2012, 08:33 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
Join Date: Feb 2008
Posts: 16,902


You have access to all Product information in the $product Object. On your product details page in a Text module add this:

HTML Code:
<pre><?php print_r($product); ?></pre>
That will display what's in the $product Object. For one of my product it displays this:

stdClass Object
    [id] => 128400983332994
    [net_id] => 6
    [net_code] => ss
    [network] => ShareASale
    [merchant_id] => 1284
    [merchant] => Altrec
    [name] => Salomon Women's Origins Opal Skis w/ 10 Bindings
    [slug] => salomon-womens-origins-opal-skis-w-10-bindings
    [description] => High performance and stable one-ski-quiver with maximum versatility to explore the resort on and off-piste.
    [price] => 100.00
    [image] =>
    [thumbnail] =>
    [url] =>
    [tags] => sports-outdoors,sports,outdoors,outdoors-camping,camping,skis,all-mountain-skis,all,mountain
    [saleprice] => 0.00
    [brand] => Salomon
    [currency] => USD
    [sku] => 79670
    [model] => 
    [ean] => 
    [isbn] => 
    [asin] => 
    [amlocale] => 0
    [shipprice] => 0.00
    [sprice] => 0.00
    [promo] => 
    [specs] => 
    [site_link] => store/mens/salomon-womens-origins-opal-skis-w-10-bindings.html
    [cat_id] => 591458
    [state] => 1
    [legacy_id] => 478830276-15547-ss
    [qrnd] => 14056
    [cfields] => 
    [views] => 3
    [clicks] => 0
    [compset_status] => 0
    [upd_ts] => 1334513130
    [drip_ts] => 0
To access the brand name I can get it from this PHP:
PHP Code:
To access the merchant name I can get it from this PHP:
PHP Code:
Hope that helps,

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Merchant and Brand filter Widgets Nugerama Tips, Tricks & Tutorials 13 March 7th, 2012 05:01 PM
Price, merchant, brand auto filter Giftoly Questions 4 January 25th, 2012 03:57 PM
Autosubmit of category sorting resets other query variables ayorofrance Questions 9 June 8th, 2011 08:11 AM
Custom Variables tkh378 Feature Requests 1 March 2nd, 2011 06:05 PM

All times are GMT -5. The time now is 01:14 PM.

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