amazon change price

it’s that time of the year where so many of us are purchasing items from Amazon, we thought it would be a good idea to help make things easier by reminding you how to get price-change refunds from items purchased from Amazon.

Since publishing this original article back in March of 2013, we’ve had hundreds of users contact us about their successes and saving a lot of money. Keep reading to find out how you too can save money on price changes.

/* update product price as on amazone START */
$sub_req_url = $node->field_product_url[0][‘value’];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $sub_req_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
preg_match_all(‘/[<][s][p][a][n][ ][c][l][a][s][s][=]["][a][-][c][o][l][o][r][-][p][r][i][c][e][ ][a][-][s][i][z][e][-][l][a][r][g][e]["][>][0-9.$]+/’,$output,$match_cats);
$real_price_amazon = $match_catsss[0][0];
if($real_price_amazon!=”” && $real_price_amazon != $node->field_price[0][‘value’]){
$product_old_price = $node->field_price[0][‘value’];
$node_new_title = str_replace($product_old_price,$real_price_amazon,$node->title);
$node->title = $node_new_title;
$node->field_price[0][‘value’] = $real_price_amazon;
$pathss = drupal_get_path_alias(‘node/’.$node->nid);
/* update product price as on amazone END */

Was this article helpful?

Related Articles