Sanjoy Roy

[MCM, MCP, SCJP] – Senior PHP Programmer

Creloaded 6.2 – Call for prices with Product Extra Fields


Create an Extra field ‘Call for prices’ through Creloaded 6.2 backend.
Modify the product_listing.php file by adding the following function at the end of the file.

function getProductsExtraFieldValue($extra_fields_id=4, $products_id){
$ef_value = ”;
$ef_query = tep_db_query(“SELECT `products_extra_fields_value` FROM `products_to_products_extra_fields` WHERE `products_extra_fields_id`='”.$extra_fields_id.”‘ AND `products_id`= ‘”.$products_id.”‘ “);
while ($ef_rows = tep_db_fetch_array($ef_query)) {
$ef_value = $ef_rows[‘products_extra_fields_value’];
}
return $ef_value;
}

The call the function getProductsExtraFieldValue() and do the customization in your need.

$call_for_price = getProductsExtraFieldValue(4,$listing[$x][‘products_id’]);

if ($call_for_price ==”){
$lc_text = $pf->getPriceStringShort();
}else{
$lc_text = ”;
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: