Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Major Problem - No Product Option Prices!


moonlitsun

Recommended Posts

Unfortunately, some modifications to our site have rendered a complete INABILITY to show product option prices when viewing the product listing page of an item. Please see an example here:

 

http://dropshipdirect.com/warehouse/produc...products_id=136

 

:( Oddly enough, when you add an option to the shopping cart, the shopping cart DOES update both the item description and price adjustment. However, the prices themselves are not showing up as they should on the product listing page within the option boxes.

 

The only reason I can imagine this may have happened is because of a modification we made to this page: B2BSuite. This mod is a combination of a few contributions, including Separate Price per customer (which lets you set group pricing for every individual item...i.e. wholesale and retail) and "log-in to view prices." In this instance, we have disabled login to view prices, but do have the separate pricing per customer running (which is critical to our operation).

 

Following is a snippet of the relevant code within catalog/product_info.php:

 

?>
? ? ? ? ?<table border="0" cellspacing="0" cellpadding="2">
? ? ? ? ? ?<tr>
? ? ? ? ? ? ?<td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td>
? ? ? ? ? ?</tr>
<?php
? ? ?$products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");
? ? ?while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
? ? ? ?$products_options_array = array();
? ? ? ?$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");
? ? ? ?while ($products_options = tep_db_fetch_array($products_options_query)) {
? ? ? ? ?$products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
? ? ?//B2BSuite START
? ?if ($products_options_values['options_values_price'] != '0') 
? ? ? ? ? ? {
? ? ? $option_price_display ?= ?' (' . $products_options_values['price_prefix'] . $currencies->display_price($products_options_values['options_values_price'], tep_get_tax_rate($product_info_values['products_tax_class_id'])) .') ';
? ? ? ? ? ?if (PRICES_LOGGED_IN == 'false') {
? ?$option_price_display_d = $option_price_display;
? ?	}
?	if ((PRICES_LOGGED_IN == 'true') && (!tep_session_is_registered('customer_id'))) {
? ?$option_price_display_d = '';
?	} ?else ?{
? ?$option_price_display_d = $option_price_display;
?	}
? ? ? ? ? ?$products_options_array[sizeof($products_options_array)-1]['text'] .= $option_price_display_d;
?	//B2BSuite END
? ? ? ? ?}
? ? ? ?}

? ? ? ?if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {
? ? ? ? ?$selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];
? ? ? ?} else {
? ? ? ? ?$selected_attribute = false;
? ? ? ?}
?>
? ? ? ? ? ?<tr>
? ? ? ? ? ? ?<td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>
? ? ? ? ? ? ?<td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>
? ? ? ? ? ?</tr>
<?php

 

As you can see, the B2BSuite may have modified some of the content so as to have interrupted the product option prices showing up on the product listing. Furthermore, separate pricing per customer isnt relevant to an item option...but only to the main price of the product itself (hope this makes sense). :blink:

 

ANYONE's feedback on the above code is GREATLY appreciated. Since we're adding alot of technology and custom-build products, product options with previewed pricing is of great value to us.

 

Thanks so much in advance for your help! B)

 

BTW ... I am using OSCOMMERCE 2.2 MS2 (latest official release)

Carpe Carp: Seize the Fish.

Link to comment
Share on other sites

  • 1 month later...

Archived

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

×
×
  • Create New...