Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 17th Nov 2014, 01:00 AM   #1
Warrior Member
 
Join Date: 2014
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default
how to get live prices for affiliate marketing?
Share on: 
fb share twitter share gplus share more share

I have WordPress e commerce site with responsive comparison theme , Now I have setup crawler which scrapes the price from various pages . This crawler gives me an api (url) which i want to post instead of numeric values. Now how do I program it to get the data from url and if the data from url is not available then to use another variable which would contain a fallback price. I want to use this api because the crawler runs every 15 minutes and could help me in getting live data. I am beginner .

My class_core file is this I suppose:

Price Display
================================================== ======================== */
function PRICE($val){
// RETURN IF NOT NUMERIC
if(!is_numeric($val) && defined('WLT_JOBS') ){ return $val; }


if(isset($GLOBALS['CORE_THEME']['currency'])){
$seperator = "."; $sep = ","; $digs = 2;
if(is_numeric($val)){
$val = number_format($val,$digs, $seperator, $sep);
}
$val = hook_price_filter($val);

// RETURN IF EMPTY
if($val == ""){ return $val; }

// LEFT/RIGHT POSITION
if(isset($GLOBALS['CORE_THEME']['currency']['position']) && $GLOBALS['CORE_THEME']['currency']['position'] == "right"){
if(substr($val,-3) == ".00"){ $val = substr($val,0,-3); }
$val = $val.$GLOBALS['CORE_THEME']['currency']['symbol'];
}else{
$val = $GLOBALS['CORE_THEME']['currency']['symbol'].$val;
}
}
anshulanilbansal is offline  
Closed Thread


Bookmarks

Tags
affiliate, ecommerce, live, live price, marketing, php, prices, scraper, wordpress


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 06:12 AM.