Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Seperate Pricing Per Customer v3.5


scendent

Recommended Posts

I've been attempting to fix this. My first instinct was that the error was in index.php, since it only breaks in the category listing and in the product listing. I tried comparing my index.php to the one included in the contribution, and making quadruply sure that I installed it correctly. As far as I could tell, I had. Then I just dropped in the included index.php file, and see if that fixed the problem. The problem remained.

 

I then wondered if it might be the product_listing page, but extensive comparison with the included product_listing page didn't work. Nor did dropping it into my shop.

 

I'm guessing the error's elsewhere then. Any advice as to where I might look, or what the errors my stem from would be appreciated.

Always BACK UP your files and your database before making any changes. Before asking questions, check out the Knowledge Base. Check out the contributions to see if your problem's solved there. Search the forums.

 

Useful threads: Store Speed Optimization How to make a horrible shop Basics for design change How to search the forums

 

Useful contributions: Easypopulate Fast, Easy Checkout Header Tag Controller

Link to comment
Share on other sites

I've been attempting to fix this.
I think it has to do with the index page indeed and your host using MySQL5. Can you change your index.php to use the queries mentioned in this post on page 95, close to the bottom? Hopefully those are MySQL5 valid and get rid of the error.

 

Let us know when it does, than we have confirmation of that.

Link to comment
Share on other sites

Thank you! That fixed it.

Always BACK UP your files and your database before making any changes. Before asking questions, check out the Knowledge Base. Check out the contributions to see if your problem's solved there. Search the forums.

 

Useful threads: Store Speed Optimization How to make a horrible shop Basics for design change How to search the forums

 

Useful contributions: Easypopulate Fast, Easy Checkout Header Tag Controller

Link to comment
Share on other sites

I've been skimming thru this rather small Forum for SPPC :P and know that SPPC is quite an involved contribute to install, but with all the fuss, I figure it's worth having...BUT...only if it will do the job I need it to do....SOOOO.... I'd love some honest comments as to whether SPPC is for me or not, before I go thru the painful process of installation (and no doubt adding to your growing list of queries!)....
I'll try to be honest, but I'm obviously not objective.

 

1. To give specific clients their own discount or quantity discount rate and/or special product price. This is NOT a wholesale or retail based amount... It's purely an individually negotiated rate with each customer (I deal in business to business sales mostly)

Then every customer is in its own customer group. Not really a problem for the catalogue side but the page where you put in the prices (admin/categories.php) becomes too big when you have many customers. You need to take that out and use a separate page for it. Perhaps Quick Price Updates for SPPC can deal with it until the drop-down box for the customer groups becomes too big.

 

Another thing is that on the catalogue side tables are dynamically made and updated with prices for the customer groups. Those are needed for the correct sorting on price in the category listing and advances search listing. You might need to write a cron job to delete those after they have reaches a certain age, to avoid having too many tables in your database (don't know how many you can have in there though).

2. Other contributions I've installed are only small(is) - such as Customer Account Number, Reconfigured Order Emails, PayPal Australia module... any experiences with these clashing with SPPC?
Don't think so.

 

I would also like to know if the discount % or value appears on the order form and invoice?
No, you would have to write that yourself.
Link to comment
Share on other sites

I've decided to go with SPPC+hide products+price break for SPPC to start.

 

I am having trouble merging the sql statement in index.html, around line 175 for the several if/else ($listing_sql = ...) sections, with the 2005nov13 update for MySql5.0; and also in advanced_search_result.php for same.

I can see the differences using BeyondCompare, but I don't understand exactly how to make the two changes (update & SPPC) merge within one statement (original). It started out looking so easy, just swap a couple parts in the middle, but then I got lost in the maze of which line matched which other line among the three files, and SPPC has 8 $listing_sql where the original has 4, and each of the statements is just a little different.

 

For example

original; index.php line 175:

$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";

 

update:

$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";

 

SPPC (I think this is the right line 212 but maybe it should be 210):

$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS_RETAIL_PRICES . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";

 

I currently see my choices as: don't worry about the MySql5.0 update as my site is using MySql4.4 and use SPPC as is, OR, see if one of y'all has already made this merge or is willing to do so & share.

 

If I don't need to worry about the MySql5.0 update,

then I would need to know how to remove the changes already made to the database for it:

ALTER TABLE whos_online MODIFY COLUMN last_page_url VARCHAR(255) NOT NULL;

ALTER TABLE customers MODIFY COLUMN customers_default_address_id INTEGER;

ALTER TABLE customers_basket MODIFY COLUMN final_price DECIMAL(15,4);

or maybe those don't have to be put back the way they were before the update.

 

As always, TIA for advice, guidance & solutions.

 

I am trying to use SPPC, Price breaks, and Hide product as well. I am having problems getting them to work togehter. Can you post you code? Or anyone who has all 3 of these working together!!!

Link to comment
Share on other sites

Hi All,

 

Just finished installing this contrib. I have my first problem, I found a similar post a few pages back but no answer.

 

At the bottom if my main page I have

 

Parse error: parse error, unexpected T_ELSE in /home/branches/public_html/online/includes/modules/new_products.php on line 25

 

And the page is not displaying how it should Take a look HERE

 

I would appreciate any help I can get

 

Cheers Viss

Link to comment
Share on other sites

Just finished installing this contrib. I have my first problem, I found a similar post a few pages back but no answer.

 

At the bottom if my main page I have

 

Parse error: parse error, unexpected T_ELSE in /home/branches/public_html/online/includes/modules/new_products.php on line 25

Something like that is typically for an operator error (when you were adding the new code to the page).
And the page is not displaying how it should
What I saw when I looked is that the site starts with code after the left navigation. Before that, everything is gone. Hard to say what goes wrong with this apparently not standard version of osC.
Link to comment
Share on other sites

I am trying to use SPPC, Price breaks, and Hide product as well. I am having problems getting them to work togehter. Can you post you code? Or anyone who has all 3 of these working together!!!
Jeep-Ice already has this coded. I think I'm the one responsible for holding up the upload of the new contribution. Perhaps he can email you what he has finished.
Link to comment
Share on other sites

Something like that is typically for an operator error (when you were adding the new code to the page).

What I saw when I looked is that the site starts with code after the left navigation. Before that, everything is gone. Hard to say what goes wrong with this apparently not standard version of osC.

 

So because this is a non standard install made to suit Australian conditions does this meen I cant get support here ?

Link to comment
Share on other sites

So because this is a non standard install made to suit Australian conditions does this meen I cant get support here ?
No, it means that since nobody here has knowledge about what is different in your install errors you may get are incomprehensible for us. Not long ago somebody else had error after error and we found out that MS1 was the install she used. That was not compatible with this contribution.

 

As said that particular error is something like a typo. Without seeing the code nobody can tell you something about it IMHO.

Link to comment
Share on other sites

Hi,

 

Big apologies if this has been answered elsewhere (I'm sure it must have been) but I can't seem to find an answer.

 

On entering the shop the correct prices are shown in "New Products". Clicking on a category in the categary menu (Exclusive Products, in this case) displays a page with the correct prices. The problem happens when I then click on a sub-category (Vinyl or CDs). I get the retail prices displayed. If I add an item to the cart, the cart displays the correct price.

 

If anyone knows how to sort this I would be eternally grateful. Thanx.

Link to comment
Share on other sites

I am trying to use SPPC, Price breaks, and Hide product as well. I am having problems getting them to work togehter. Can you post you code? Or anyone who has all 3 of these working together!!!

 

Hi,

 

Ok, I have release the contribution Hide Price if $0 for "Quantity Price Breaks for SPPC 4.1.1". Here the info below :

 

Info:

===

 

Adapted to work with the contribution Separate Pricing Per Customer v4.1.1 and the contribution "Quantity Price Breaks".

 

By Janz for the adaptation of the code for SPPC

 

and

 

Jeep for Hardcoding and documentation file

 

Thank's to Eric Montgomery for the original code.

 

This contribution is intended to hide the price and purchase button from the catalog if no price has been entered, instead of showing a price of $0.00. You have to put $0.00 in each customer group price to obtain this otherwise you gonna have no price in retail group and a price in the wholesale group. You can play with that too. :-)

 

This may be of use if you want some items to be informational items only, such as services or to use your shop as a catalog only.

 

This contribution contains just the instructions for manually applying this contribution and you have to get SPPC 4.1.1 and Quantity Price Breaks for SPPC 4.1.1. installed already.

 

If you have problem, just come to the forum support of SPPC 4.11 at http://www.oscommerce.com/forums/index.php?showtopic=53436. Good luck.

 

Have fun.

Edited by Jeep_ice

John

--------------------

osCommerce 2.3.4 Bootstrap Edge

Link to comment
Share on other sites

The problem happens when I then click on a sub-category (Vinyl or CDs). I get the retail prices displayed. If I add an item to the cart, the cart displays the correct price.
Strange, these prices are dealt with in product_listing.php (and pretty much stand alone, for groups prices). Are you sure you don't use an adapted product_listing, in columns e.g.?
Link to comment
Share on other sites

I am having trouble merging the sql statement in index.html, around line 175 for the several if/else ($listing_sql = ...) sections, with the 2005nov13 update for MySql5.0; and also in advanced_search_result.php for same.

 

I was also having the same problem. Using the code from this post, I was able to get SPCC running, although it broke 2 other contributions - Featured Products (which I fixed using code found in this post) and Description in Product Listing Hack MS2 v.2.4 (found here).

 

I've been through every file and I think I've narrowed the problem down to this code that Products Description add to index.php

 

Find:
	case 'PRODUCT_LIST_NAME':
	  $select_column_list .= 'pd.products_name, ';
	  break;
Below add:
// Products Description Hack begins
	case 'PRODUCT_LIST_DESCRIPTION':
  $select_column_list .= 'pd.products_description, ';
	  break;
// Products Description Hack ends

Find:
	case 'PRODUCT_LIST_NAME':
	  $listing_sql .= "pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
	  break;

Add below:
// ########### Products Description Hack begins ###########
	case 'PRODUCT_LIST_DESCRIPTION':
  $listing_sql .= "pd.products_description ". ($sort_order == 'd' ? "desc" : "");
	  break;
// ############## End Added #################

 

and to advanced_search_result

Find:
  case 'PRODUCT_LIST_MODEL':
	$select_column_list .= 'p.products_model, ';
	break;

Below add:

  // Products Description Hack begins
  case 'PRODUCT_LIST_DESCRIPTION':  
	$select_column_list .= 'pd.products_description, ';
	break;
  // Products Description Hack ends

Find:
  case 'PRODUCT_LIST_NAME':
	$order_str .= "pd.products_name " . ($sort_order == 'd' ? "desc" : "");
	break;

Add below:
  // Products Description Hack begins
  case 'PRODUCT_LIST_DESCRIPTION':
	$order_str .= "pd.products_description " . ($sort_order == 'd' ? "desc" : "");
	break;
  // Products Description Hack ends

 

Any help getting this sorted would be greatly appreciated.

Happiness does not come from doing easy work but from the afterglow of satisfaction that comes after the achievement of a difficult task that demanded our best. --Anonymous

Link to comment
Share on other sites

Jeep-Ice already has this coded. I think I'm the one responsible for holding up the upload of the new contribution. Perhaps he can email you what he has finished.

 

Jan Thanks! I was really hoping I would be able to get everything working together. Almost there! I got one question though. Can you recommend a good Column controller contribution. I was using "Column Controller w Admin v2.2_for_2.2ms2" but it seem to really interfere with hide products. I like the column controller because I could turn boxes off and on and also switch between showing products in columns or rows from admin. Any suggestion on what I can do?

Thanks! You all are some real life savers! I don't think I would have even attempted to try osc if I had not been doing my prelim research and saw how good you all are at fixing the problems!!!!

Link to comment
Share on other sites

Hi,

 

Ok, I have release the contribution Hide Price if $0 for "Quantity Price Breaks for SPPC 4.1.1". Here the info below :

 

Info:

===

 

Adapted to work with the contribution Separate Pricing Per Customer v4.1.1 and the contribution "Quantity Price Breaks".

 

By Janz for the adaptation of the code for SPPC

 

and

 

Jeep for Hardcoding and documentation file

 

Thank's to Eric Montgomery for the original code.

 

This contribution is intended to hide the price and purchase button from the catalog if no price has been entered, instead of showing a price of $0.00. You have to put $0.00 in each customer group price to obtain this otherwise you gonna have no price in retail group and a price in the wholesale group. You can play with that too. :-)

 

This may be of use if you want some items to be informational items only, such as services or to use your shop as a catalog only.

 

This contribution contains just the instructions for manually applying this contribution and you have to get SPPC 4.1.1 and Quantity Price Breaks for SPPC 4.1.1. installed already.

 

If you have problem, just come to the forum support of SPPC 4.11 at http://www.oscommerce.com/forums/index.php?showtopic=53436. Good luck.

 

Have fun.

 

Thanks for the putting this out. It should really help me. I have 2 questions or maybe 1 question and 1 recommendation. In the instructions STEP 8. Did you intentionally repeat the modded code for those 2 instances. I am getting the price showing twice?

 

Also, I think the foreach statement in product_listing_col.php does not work for MySQL 5. I did some digging and found this to be a/the solution.

 

In product_listing_col.php

Change: foreach ($buy_now_button_array as $column1 => $lc_text1) {

 

To: foreach ((array)$buy_now_button_array as $column1 => $lc_text1) {

 

This seemed to work for me!

Definitely would like your feedback though!!!!!!

Link to comment
Share on other sites

Thanks for the putting this out. It should really help me. I have 2 questions or maybe 1 question and 1 recommendation. In the instructions STEP 8. Did you intentionally repeat the modded code for those 2 instances. I am getting the price showing twice?

 

Also, I think the foreach statement in product_listing_col.php does not work for MySQL 5. I did some digging and found this to be a/the solution.

 

In product_listing_col.php

Change: foreach ($buy_now_button_array as $column1 => $lc_text1) {

 

To: foreach ((array)$buy_now_button_array as $column1 => $lc_text1) {

 

This seemed to work for me!

Definitely would like your feedback though!!!!!!

 

Hi,

 

I think if you have this problem with product_listing_col.php is because you use Column Controller w Admin v2.2_for_2.2ms2. The code we are providing in Hide Price if $0 for "Quantity Price Breaks for SPPC 4.1.1". is for the contribution Column Product Listing (for Separate Pricing Per Costomer v4.0). Remove your contribution and try this one. I think all is gonna be ok after that. Tell us news about it. :thumbsup:

John

--------------------

osCommerce 2.3.4 Bootstrap Edge

Link to comment
Share on other sites

I forgot to mention that this contribution have a 2 in 1 : It's good for the SPPC 4.1 alone version and it's good for the SPPC 4.1 with Quantity Price Breaks for Separate Pricing Per Customer 1.3, this package contain all the instructions to work with one or the other version.

 

Great job! I found an issue that maybe I just have but need some help!

1. Is the price and add to cart button controlled by the priceformatter.php when no customer is logged in. I am asking because after installing hide products and show price list, my add to cart button has disappeared. It does not show up anytime. Where did I go wrong?

 

2. I also do not want the "Your Price:" to show up if not customer is logged in. I don't want new customers to my site thinking I am giving special pricing to certain people.

 

Here is a link to my site!

 

I am currently working on it so excuse the mess!

Link to comment
Share on other sites

Hi,

 

I think if you have this problem with product_listing_col.php is because you use Column Controller w Admin v2.2_for_2.2ms2. The code we are providing in Hide Price if $0 for "Quantity Price Breaks for SPPC 4.1.1". is for the contribution Column Product Listing (for Separate Pricing Per Costomer v4.0). Remove your contribution and try this one. I think all is gonna be ok after that. Tell us news about it. :thumbsup:

 

Yes! I got it to work with the SPPC column controller! I did not understand until I got down to the end! Could use an admin interface though! Liked that about the column controller! :D

Link to comment
Share on other sites

Hi,

 

I think if you have this problem with product_listing_col.php is because you use Column Controller w Admin v2.2_for_2.2ms2. The code we are providing in Hide Price if $0 for "Quantity Price Breaks for SPPC 4.1.1". is for the contribution Column Product Listing (for Separate Pricing Per Costomer v4.0). Remove your contribution and try this one. I think all is gonna be ok after that. Tell us news about it. :thumbsup:

 

Any word on the step 8 of the Hide prod instructions?

Link to comment
Share on other sites

Hi JanZ,

 

I am finally about to embark on this contrib and I wonder if you would possibly clarify a few things for me before I start. The store I am currently working on uses the Multi-Stores contrib and the way I would like to try and get SPPC to work is probably completely different to the ways other people use it.

 

1. I would like to be able to use the PWA contribution for retail customers.

2. I would like trade clients to use the default create account system.

3. I would like to be able to add a group for dropshippers where they create an account the same way that the trade clients do with the exception that they will be able to place an order and enter their customers delivery details.

 

Do you think that the SPPC is adaptable enough to be able to do this?

 

Any pointers or advice you could offer me before I start this mammoth task would be greatly appreciated.

 

Also if anyone else has done the same sort of thing I would love to hear from you as well.

 

Thanks

 

Mark

Lifes a bitch, then you marry one, then you die!

Link to comment
Share on other sites

New contrib added that some here may be interested in:

 

Buy/Add button removal if quantity = 0(for SPPC w/ Column Product Listing)

http://www.oscommerce.com/community/contributions,4012

 

I had to compile several other contribs and then modify to work with my modified site, so I figure I would post it up for other running SPPC, Column Product Listing for SPPC, and Quick Updates for SPPC.

Link to comment
Share on other sites

Great job! I found an issue that maybe I just have but need some help!

1. Is the price and add to cart button controlled by the priceformatter.php when no customer is logged in. I am asking because after installing hide products and show price list, my add to cart button has disappeared. It does not show up anytime. Where did I go wrong?

 

2. I also do not want the "Your Price:" to show up if not customer is logged in. I don't want new customers to my site thinking I am giving special pricing to certain people.

 

Here is a link to my site!

 

I am currently working on it so excuse the mess!

 

Hi....

 

You don't supposed to see "your price " if you not logged. Please send your code of your product_info.php here and we will check what is the problem.

John

--------------------

osCommerce 2.3.4 Bootstrap Edge

Link to comment
Share on other sites

Great job! I found an issue that maybe I just have but need some help!

1. Is the price and add to cart button controlled by the priceformatter.php when no customer is logged in. I am asking because after installing hide products and show price list, my add to cart button has disappeared. It does not show up anytime. Where did I go wrong?

 

2. I also do not want the "Your Price:" to show up if not customer is logged in. I don't want new customers to my site thinking I am giving special pricing to certain people.

 

Here is a link to my site!

 

I am currently working on it so excuse the mess!

 

Yeah, the price is controlled by the priceformatter.php.

John

--------------------

osCommerce 2.3.4 Bootstrap Edge

Link to comment
Share on other sites

Hi....

 

You don't supposed to see "your price " if you not logged. Please send your code of your product_info.php here and we will check what is the problem.

 

Here it is:

<?php

/*

$Id: product_info.php,v 1.97 2003/07/01 14:34:54 hpdl Exp $

adapted for Separate Pricing Per Customer v4 2005/03/06

adapted for Separate Pricing Per Customer v4 and Price Break 1.11.3 2005/03/12

adapted for Separate Pricing Per Customer v4.1, Hide products from groups mod 2005/03/28

including an optimization to avoid double queries for the same info

adapted for SPPC v4 to show price list 2005/09/19

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);

 

$product_check_query = tep_db_query("select count(*) as total 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_check = tep_db_fetch_array($product_check_query);

 

// BOF Separate Price per Customer

if(!tep_session_is_registered('sppc_customer_group_id')) {

$customer_group_id = '0';

} else {

$customer_group_id = $sppc_customer_group_id;

}

// EOF Separate Price per Customer

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

<script language="javascript"><!--

function popupWindow(url) {

window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res

izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le

ft=150')

}

//--></script>

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<!-- header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->

 

<!-- body //-->

<table border="0" width="100%" cellspacing="3" cellpadding="3">

<tr>

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- left_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

<!-- left_navigation_eof //-->

</table></td>

<!-- body_text //-->

<td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">

<?php

if ($product_check['total'] < 1) {

?>

<tr>

<td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<?php

} else {

// BOF Separate Price per Customer, Price Break 1.11.3 mod

// BOF Show price list for SPPC 4.1

/* Original SPPC 4.1 code

 

$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']));

}

 

*/

 

$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_price as list_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'];

}

$products_price = '';

if ($customer_group_id != '0') {

$products_price = '<span class="header">' . SHOW_PRICE_LIST;

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

$products_price .= '</span><br>'; // customer group prices on the next line end of small text for retail prices

}

$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>';

// EOF Separate Price per Customer

} 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'];

}

 

$products_price = '';

if ($customer_group_id != '0') {

$products_price = '<span class="header">' . SHOW_PRICE_LIST;

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

$products_price .= '</span><br>'; // customer group prices on the next line end of small text for retail prices

}

$products_price .= SHOW_YOUR_PRICE ;

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

// EOF Separate Price per Customer

}

// EOF Show price list 1.0 for SPPC 4.1

 

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

$products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>';

} else {

$products_name = $product_info['products_name'];

}

?>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="pageHeading" valign="top"><?php echo $products_name; ?></td>

<!-- BOF "Hide Price if $0 for "Quantity Price Breaks for SPPC 4.1.1" modification -->

<!-- Original code below -->

<!-- <td class="pageHeading" align="right" valign="top"><?php //echo $products_price; ?></td>-->

<td class="pageHeading" align="right" valign="top"><?php echo (($product_info['products_price'] > 0) ? $products_price : HIDE_PRICE_INFO ); ?></td>

<!-- EOF "Hide Price if $0 for "Quantity Price Breaks for SPPC 4.1.1" modification -->

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td class="main">

<?php

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

?>

<table border="0" cellspacing="0" cellpadding="2" align="right">

<tr>

<td align="center" class="smallText">

<script language="javascript"><!--

document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');

//--></script>

<noscript>

<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>

</noscript>

</td>

</tr>

</table>

<?php

}

?>

<p><?php echo stripslashes($product_info['products_description']); ?></p>

<?php

$products_attributes_query = tep_db_query("select count(*) as total 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 . "'");

$products_attributes = tep_db_fetch_array($products_attributes_query);

if ($products_attributes['total'] > 0) {

?>

<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']);

if ($products_options['options_values_price'] != '0') {

$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';

}

}

 

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

}

?>

</table>

<?php

}

?>

</td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

$reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");

$reviews = tep_db_fetch_array($reviews_query);

if ($reviews['count'] > 0) {

?>

<tr>

<td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

}

 

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

?>

<tr>

<td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

}

 

if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {

?>

<tr>

<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>

</tr>

<?php

} else {

?>

<tr>

<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>

</tr>

<?php

}

?>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>

<!-- BOF price-break-1.11.3 <td class="main" align="right"><?php // echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);

?></td> -->

<!-- BOF "Hide Price if $0 for "Quantity Price Breaks for SPPC 4.1.1" modification -->

<?php if($pf->thePrice > 0) {

?>

<td class="main" align="right">

<table border="0" align="right">

<tr><td align="center">

<?php echo TEXT_ENTER_QUANTITY . ":" . tep_draw_input_field('cart_quantity', $pf->adjustQty(1), 'size="6"'); ?>

</td></tr>

<tr><td align="center">

<?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?>

</td></tr>

</table>

</td>

<?php

}

?>

<!-- EOF "Hide Price if $0 for "Quantity Price Breaks for SPPC 4.1.1" modification -->

<!-- EOF price-break-1.11.3 -->

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td>

<?php

if ((USE_CACHE == 'true') && empty($SID)) {

echo tep_cache_also_purchased(3600);

} else {

include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);

}

}

?>

</td>

</tr>

</table></form></td>

<!-- body_text_eof //-->

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- right_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

<!-- right_navigation_eof //-->

</table></td>

</tr>

</table>

<!-- body_eof //-->

 

<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

<!-----<br>----->

</body>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...