Jump to content
Sign in to follow this  
CnTGifts

Seperate Price per customer

Recommended Posts

umm how do you install both of these

 

i isntalles SPPC then am tryign to install SPL for SPPC and the edits require the same thigns to be edited

 

 

like the first one

 

Open the file catalog/product_info.php

 

Find the following lines between line 81 and 105 starting with :

 

 

$product_info_query = tep_db_query("select p.products_id,

 

ends just before:

 

if (tep_not_null($product_info['products_model'])) } )

 

 

is whats in the file i would need to overwrite the modifications done by the SPPC

 

$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
$product_info = tep_db_fetch_array($product_info_query);

tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");

if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
// BOF Separate Price per Customer

$scustomer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id']. "' and customers_group_id = '" . $customer_group_id . "'");
if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) {
$product_info['products_price']= $scustomer_group_price['customers_group_price'];
}
// EOF Separate Price per Customer

$products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
} else {
// BOF Separate Price per Customer
$scustomer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id']. "' and customers_group_id = '" . $customer_group_id . "'");
if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) {
$product_info['products_price']= $scustomer_group_price['customers_group_price'];
}
// EOF Separate Price per Customer

$products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
}

if (tep_not_null($product_info['products_model'])) {

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×