Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need help passing "Holiday Specials" pricing


ecroskey

Recommended Posts

Posted

Hello All,

 

I created a "Holiday Special" section on my site by cloning the Specials. The page containing the "Holiday Specials" displays the correct price , as in the original price is slashed out and the lower special price appears in red, just as it should.

 

Once the data is passed to shopping_cart.php the price is the original (normal) price, not the "Holiday Special" price.

 

In product_info.php I added the following statement:

 

<?php

} else {

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

$product_info_values = tep_db_fetch_array($product_info);

 

if ($new_price = tep_get_products_special_price($product_info_values['products_id'])) {

$products_price = '<s>' . $currencies->display_price($product_info_values['products_price'], tep_get_tax_rate($product_info_values['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info_values['products_tax_class_id'])) . '</span>';

}

elseif ($new_hprice = tep_get_products_hspecial_price($product_info_values['products_id'])) {

$products_price = '<s>' . $currencies->display_price($product_info_values['products_price'], tep_get_tax_rate($product_info_values['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_hprice, tep_get_tax_rate($product_info_values['products_tax_class_id'])) . '</span>';

}

else {

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

}

$products_attributes = tep_db_query("select popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'");

if (tep_db_num_rows($products_attributes)) {

$products_attributes = '1';

} else {

$products_attributes = '0';

}

?>

 

 

But like I said, when I pass this data to the shopping cart, it isn't getting the correct pricing.

 

Any ideas or advice would be a tremendous help! The web site is Lindenwold if you would like to look at it and see what I mean. Just click on the link for "Holiday Specials" on the home page.

 

Thanks,

Eric

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...