Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Seperate Pricing Per Customer v3.5


scendent

Recommended Posts

1. Call to undefined function: shopping_cart.php

On trying to add product to shoping cart I get the following error. Fatal error: Call to undefined function: get_products() in /home/xxxxx/public_html/shop/catalog/shopping_cart.php on line 69.

shopping_cart.php is not a function but a class. The class has the function get_products.

 

2. SQL syntax Error products_new.php

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') and status = '1' and s.customers_group_id = '0'' at line 1

 

select s.products_id, specials_new_products_price from specials s where () and status = '1' and s.customers_group_id = '0'

If you would have added the new code correctly you can't have gotten there. It means that are no new products and that would have been caught in line 79:

  if ($products_new_split->number_of_rows > 0) {
.
.
.
}  else { 
?>
	  <tr>
		<td class="main"><?php echo TEXT_NO_NEW_PRODUCTS; ?></td>

So you should have seen "There are currently no products."

Cant figure out how to get around any of the problems above.
Just be very careful in following the instructions, compare it with the files in the package if you can't use those file directly (because of other contributions already in there).
Link to comment
Share on other sites

shopping_cart.php is not a function but a class. The class has the function get_products.

 

If you would have added the new code correctly you can't have gotten there. It means that are no new products and that would have been caught in line 79:

  if ($products_new_split->number_of_rows > 0) {
.
.
.
}  else { 
?>
	  <tr>
		<td class="main"><?php echo TEXT_NO_NEW_PRODUCTS; ?></td>

So you should have seen "There are currently no products."

Just be very careful in following the instructions, compare it with the files in the package if you can't use those file directly (because of other contributions already in there).

 

 

Well, Iam new to PHP but I am using a WinMerge to compare code and update manually. I am currently redoing line by line of file you included.

 

It may help me grately if you can point me to specific files to concentrate on for solving each of the problems.

 

Tony

Link to comment
Share on other sites

1. Call to undefined function: shopping_cart.php

On trying to add product to shoping cart I get the following error. Fatal error: Call to undefined function: get_products() in /home/xxxxx/public_html/shop/catalog/shopping_cart.php on line 69.

Probably an error in includes/classes/shopping_cart.php, because there is where the function can be found.
2. SQL syntax Error products_new.php

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') and status = '1' and s.customers_group_id = '0'' at line 1

Must be an error in catalog/products_new.php.
Link to comment
Share on other sites

I have searched the thread and have not been able to find a solution.
It has come up a few times, but there are quite a bit of posts in this thread, so you would have to know how to formulate your query.
I would like to have wholesale account automatically approved (like default new account) with having to go through the admin to assign to a group.

 

Is there a way to set it up so if there is info in tax account number, then wholesale would be approved automatically.

Take a look at this post but make sure you add in the bugfix for create_account. This should get you going I think.
Link to comment
Share on other sites

I installed the contribition but I get this error in my admin panel

 

Under Customer Groups

 

1146 - Table 'webassi_oscommerce.TABLE_CUSTOMERS_GROUPS' doesn't exist

 

select count(*) as total from TABLE_CUSTOMERS_GROUPS g

 

 

and

 

Under Customers

 

1146 - Table 'webassi_oscommerce.TABLE_CUSTOMERS_GROUPS' doesn't exist

 

select customers_group_id, customers_group_name from TABLE_CUSTOMERS_GROUPS order by customers_group_id

 

 

I have run the install document as per the read file. Please help me as both the tables are in MYSql database

Edited by Pixy

Pixy

One day at a time - we all have to learn

Link to comment
Share on other sites

As suspected the code for the query is really very similar. Just changing a few names and chopping of: limit " . MAX_RANDOM_SELECT_SPECIALS) is enough to get you going:

 

I used the code you posted Jan and it seems to work...just wondering what you meant by the above.....as I dont see

limit " . MAX_RANDOM_SELECT_SPECIALS)
used anywhere in the scrolling specials box contrib.

 

Thanks

Link to comment
Share on other sites

1146 - Table 'webassi_oscommerce.TABLE_CUSTOMERS_GROUPS' doesn't exist
Sounds like you haven't added the defines for the table names to admin/includes/database_tables.php

 // BOF Separate Pricing per Customer
 define('TABLE_PRODUCTS_GROUPS', 'products_groups');
 define('TABLE_CUSTOMERS_GROUPS', 'customers_groups');
 // EOF Separate Pricing per Customer

Link to comment
Share on other sites

I used the code you posted Jan and it seems to work...just wondering what you meant by the above.....as I dont see used anywhere in the scrolling specials box contrib.
I guess I was referring to the code for the specials box, which has pretty similar sql.
Link to comment
Share on other sites

UGH GRRR - HELP

I ran the install file as per the instructions and I also loaded all the required files (as per the instructions) BUT it is still giving me this error in Admin under Customer GroupsGroups Search:

 

 

Name Action

1146 - Table 'webassi_oscommerce.TABLE_CUSTOMERS_GROUPS' doesn't exist

 

select count(*) as total from TABLE_CUSTOMERS_GROUPS g

 

[TEP STOP]

 

 

The table is in the SQL database - I think that I might have a problem with the sql script can anyone help me?

I am desperate to get this working as soon as possible!

Pixy

One day at a time - we all have to learn

Link to comment
Share on other sites

Still sounds like you haven't added the defines for the table names to admin/includes/database_tables.php.

 

JanZ - sorry I am not that good with sql I thought that running the install file and uploading the files will do all of that? Should I go to the file and manualy add the script in?

Pixy

One day at a time - we all have to learn

Link to comment
Share on other sites

Janz I downloaded the file (admin/includes/database_tables.php) to check the script and it is as per the instructions:

// BOF Separate Pricing per Customer

define('TABLE_PRODUCTS_GROUPS', 'products_groups');

define('TABLE_CUSTOMERS_GROUPS', 'customers_groups');

// EOF Separate Pricing per Customer

Pixy

One day at a time - we all have to learn

Link to comment
Share on other sites

Janz I downloaded the file (admin/includes/database_tables.php) to check the script and it is as per the instructions:

// BOF Separate Pricing per Customer

define('TABLE_PRODUCTS_GROUPS', 'products_groups');

define('TABLE_CUSTOMERS_GROUPS', 'customers_groups');

// EOF Separate Pricing per Customer

I don't get it, it just shouldn't happen then. Are you sure they are between the starting PHP tag ( <?php) and the end PHP tag (?>).

Otherwise try to see if those errors disappear by adding something to admin/customers_groups:

require_once(DIR_WS_INCLUDES . 'database_tables.php');

and change in admin/includes/application_top.php this line (line 44):

  require(DIR_WS_INCLUDES . 'database_tables.php');

to:

  require_once(DIR_WS_INCLUDES . 'database_tables.php');

Link to comment
Share on other sites

Try to sort by price in a product listing either on index or on the advanced search page, when not being logged in. The table will be created then automatically and you will never see that error again (perhaps that already happened by now!).

 

I was having the same problem and this fixed it. Thanks for the time saving tip!

Link to comment
Share on other sites

I am trying to apply this Contribution to a heavily modified osCommerce template. I have hit a couple of files that are substantially different from the standard osCommerce files. I have very little knowledge of PHP.

 

I will pay $125 to someone willing to apply this Contribution to the template I am using. Payment will be made through PayPal utilizing Escrow.com (I will pay the Escrow fees, of course :) ).

 

Payment will be released once I have had a chance to review the template with Contribution applied, upload it to my server, and verify that it is working. I need to have this step completed by January 15th.

 

Any takers? jedhu0920 {at} yahoo.com

Link to comment
Share on other sites

I used compare and merge this time and did a manual installation now I get these errrors:

 

 

Parse error: parse error, unexpected $ in /usr/www/users/paperc/catalog/admin/categories.php on line 1113

 

Parse error: parse error, unexpected $ in /usr/www/users/paperc/catalog/admin/customers.php on line 1244

 

There is no $ on either of these lines I checked and checked again

 

And my online catalog now looks like this

 

Parse error: parse error, unexpected $ in /usr/www/users/paperc/catalog/admin/customers.php on line 1244

I am really at my wits end I need to get this site up and running.

Does anyone know why it is doing this?

Pixy

One day at a time - we all have to learn

Link to comment
Share on other sites

In my experience an error like that usually means that a line of code is missing a closing semicolon (;) or a closing brace (}) is missing.

 

JanZ

I restored all the original files of OSCMM2 and now it works. I am kinda starting from scratch I am working from the original template installing SPPC and then doing all the template changes again. It seems to be working that way.

Tahnks for your help

Pixy

One day at a time - we all have to learn

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.

Toward Continued Success - - > Carol Hawkey - - > KidsLearnToSew.com - - > Wyoming, USA

Mods Installed - - > Authnet AIM2 - Bundled Products 1.4 - Fancier Invoice 6.1 - Email_HTML_Order_Link_Fixed - Header Tags Controller - Login aLa Amazon - JustOneAttribute - Article Manager - SPPC w/PB - spiders.txt - Dangling Carrot/Olive - Printable Catalog - CCGV(trad)

Planned Mods - - > Purchase Without Account - USPS Label - Ultimate SEO

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 don't have MySQL 5, so I can't check whether this gives trouble, but this Nov. 13 updated statements do not seem to give trouble on MySQL 4, so that is a good start ;)

 

This is the whole code starting from around line 205 to 245 (only some were changed/needed changing).

// show the products of a specified manufacturer
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
  if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only a specific category
// BOF Separate Pricing Per Customer
if ($status_product_prices_table == true) {
$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . $product_prices_table . " as tmp_pp using(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'] . "'";		
} else { // either retail or no need to get correct special prices
$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_RETAIL_PRICES . " 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'] . "'";
} // end else { // either retail...
// EOF Separate Pricing Per Customer
  } else {
// We show them all
// BOF Separate Pricing Per Customer
	if ($status_product_prices_table == true) {
	$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";	
} else { // either retail or no need to get correct special prices
	$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_RETAIL_PRICES . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";
} // end else { // either retail...
// EOF Separate Pricing Per Customer
  }
} else {
// show the products in a given categorie
  if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only specific catgeory;  
// BOF Separate Pricing Per Customer
	if ($status_product_prices_table == true) {
	$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . $product_prices_table . " as tmp_pp using(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['filter_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)$current_category_id . "'";	
	} else { // either retail or no need to get correct special prices
	$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_RETAIL_PRICES . " s using(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['filter_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)$current_category_id . "'";
	} // end else { // either retail...
// EOF Separate Pricing Per Customer
  } else {
// We show them all
// BOF Separate Pricing Per Customer
	if ($status_product_prices_table == true) {
	$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' 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)$current_category_id . "'";
	} else { // either retail or no need to get correct special prices
	$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_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS_RETAIL_PRICES . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' 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)$current_category_id . "'";
  } // end else { // either retail...
// EOF Separate Pricing per Customer

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.

Those changes can be left in, no problem IMHO.

 

I haven't looked at advanced_search_results.php yet. Some other day ;)

Link to comment
Share on other sites

Thank you for your most super fast response. After looking over what you did, the advanced_search_result.php made more sense. I would like a validation, please. and yes, I can wait until another day :)

 

original line 213:

$from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c";
<--here be the DISPLAY_PRICE_WITH_TAX clause-->
<--here be the $where_str clause-->

 

update:

$from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id";
<--here be the DISPLAY_PRICE_WITH_TAX clause-->
$from_str .= ", " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c";
<--here be the $where_str clause-->

 

sppc:

if ($status_tmp_product_prices_table == true) {
 $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c";
  } elseif ($status_tmp_special_prices_table == true) {
 $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS_RETAIL_PRICES . " s on p.products_id = s.products_id , " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c";
  } else {
 $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c";		  
  }
<--here be the DISPLAY_PRICE_WITH_TAX clause-->
<--here be the $where_str clause-->

 

sppc w/ update:

if ($status_tmp_product_prices_table == true) {
 $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) left join " . $product_prices_table . " as tmp_pp using(products_id)";
  } elseif ($status_tmp_special_prices_table == true) {
 $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) left join " . TABLE_SPECIALS_RETAIL_PRICES . " s on p.products_id = s.products_id";
  } else {
 $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id";		  
  }
<--here be the DISPLAY_PRICE_WITH_TAX clause-->
$from_str .= ", " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c";
<--here be the $where_str clause-->

Toward Continued Success - - > Carol Hawkey - - > KidsLearnToSew.com - - > Wyoming, USA

Mods Installed - - > Authnet AIM2 - Bundled Products 1.4 - Fancier Invoice 6.1 - Email_HTML_Order_Link_Fixed - Header Tags Controller - Login aLa Amazon - JustOneAttribute - Article Manager - SPPC w/PB - spiders.txt - Dangling Carrot/Olive - Printable Catalog - CCGV(trad)

Planned Mods - - > Purchase Without Account - USPS Label - Ultimate SEO

Link to comment
Share on other sites

After looking over what you did, the advanced_search_result.php made more sense. I would like a validation, please. and yes, I can wait until another day
Well, it is almost January 5 for me anyway ;) but yes, that looks fine to me. As you concluded correctly the
, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c";

is moved to a point further on and the rest stays exactly the same for SPPC.

Link to comment
Share on other sites

Thanks JanZ for the help, installation went pretty smooth overall, and the two sections where the update and sppc overlapped worked out just as posted. My two problems were with getting the whole thing to work in a subfolder (configs & stylesheets) for testing; the SPPC part was just right! This one is a real eyeball bender if installing on a modded site! But I've learned to mark each section DONE in the install file as I go to keep my place.

 

I also discovered the value of having a contribution's installation presented in several forms! There were some files better used as the new one, some were easily merged with a compare program, and some were easier to do with a find&replace. So hats-off! to Marvin Miller for the excellent documentation.

 

One part that had me scratching my head for a minute until I "saw" it was in admin/categories. One section appeared to be in the same place as Bundled Products, but it was really just a new section to add in; and another section appeared to be in the same place as Header Tag Controller, but again it was just a new section to add in. So if anyone has either of those mods, they work good together with SPPC.

 

I think I can use this with my plan even with the bundles, as I can set the retail price as a "package deal" and set Tier One and Tier Two at their respective %-off of retail prices. Then I will not have to attempt to separate a bundle for wholesale customers, nor hide them from same. That is how I will approach it for now.

 

Thanks again for a great MOD and fast accurate answers on the forum.

 

---on to price break ---

Toward Continued Success - - > Carol Hawkey - - > KidsLearnToSew.com - - > Wyoming, USA

Mods Installed - - > Authnet AIM2 - Bundled Products 1.4 - Fancier Invoice 6.1 - Email_HTML_Order_Link_Fixed - Header Tags Controller - Login aLa Amazon - JustOneAttribute - Article Manager - SPPC w/PB - spiders.txt - Dangling Carrot/Olive - Printable Catalog - CCGV(trad)

Planned Mods - - > Purchase Without Account - USPS Label - Ultimate SEO

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...