Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Iwant2Lrn

Members
  • Content count

    106
  • Joined

  • Last visited

Everything posted by Iwant2Lrn

  1. Not sure if this has been answer but it is very confusing to follow the changes in thin modd. I am getting this error! 1146 - Table 'bnmxgrp_xstore1.TABLE_PRODUCTS_SHIPPING' doesn't exist SELECT * FROM TABLE_PRODUCTS_SHIPPING WHERE products_id=33 [TEP STOP] When I go to edit the product info in admin. I thought the directions said to remove this table? If you have values in the table and you remove it it does not replace thouse if you add the table back in does it?
  2. Iwant2Lrn

    Seperate Pricing Per Customer v3.5

    JanZ, You saved me again! I will let you know how it all comes out when it get it all running. If it stays straight forward I think it might be good to make a contribution for this to work with SPPC. Thanks again!!!! :thumbsup:
  3. Iwant2Lrn

    Seperate Pricing Per Customer v3.5

    Jean/JanZ Do you think all you could help me out with post #2135? I am trying to be very careful when it comes to modifing any of the SPPC related code because I can't afford to have it break. I would like to add that mod I mentione above in though.
  4. Iwant2Lrn

    Seperate Pricing Per Customer v3.5

    Yeah, I think I have added to much to get EP to work at this point. I need to add the Quantity for Product Attributes Mod and making that work with EP is beyong my level right now. I appreciate the help though. I got another delima! I needed to add Individual Product Shipping Prices - v1.0 and I totally forgot that SPPC is taken over some/all of my pricing. I really need some help figuring out where I need to add code to priceformatter.php (I think) to get this to work. The original osc code had queries in catalog/includes/classes/shopping_cart.php like: /* $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); where this mod needs to add: $product_query = tep_db_query("select products_id, products_price, products_ship_price, products_ship_price_two, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); I don't know enough about the priceformatter.php to add the queries in. I am having some other hangups but this might get me started. Any ideas??????? Any help would be greatly appreciated!
  5. Not sure what your question is! I was able to install the modd with no problem and I have over 30 modds in my site?
  6. I am no guru but why would you need to add meta tags to you admin?
  7. Also, I want to add that products_options_values_sortorder is not getting added to the database like the other talbe entries. Here is the code I have for where it gets added to the db, i think! The highlighted is where I think it is getting added! <?php /* $Id: products_attributes.php,v 1.52 2003/07/10 20:46:01 dgw_ Exp $ adapted for quantity_mod_1_2.zip adapted for sortoptionvalues_1_0.zip 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'); $languages = tep_get_languages(); $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : ''); if (tep_not_null($action)) { $page_info = ''; if (isset($HTTP_GET_VARS['option_page'])) $page_info .= 'option_page=' . $HTTP_GET_VARS['option_page'] . '&'; if (isset($HTTP_GET_VARS['value_page'])) $page_info .= 'value_page=' . $HTTP_GET_VARS['value_page'] . '&'; if (isset($HTTP_GET_VARS['attribute_page'])) $page_info .= 'attribute_page=' . $HTTP_GET_VARS['attribute_page'] . '&'; if (tep_not_null($page_info)) { $page_info = substr($page_info, 0, -1); } // QuantityMod - BEGIN editing function update_stock($product_id) { $get_quantity_query = tep_db_query("select sum(options_quantity) as total_quantity from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id='" . (int)$product_id . "'"); $get_quantity = tep_db_fetch_array($get_quantity_query); $total_quantity = $get_quantity['total_quantity']; tep_db_query("update " . TABLE_PRODUCTS . " set products_quantity = '" . $total_quantity . "' where products_id = '" . (int)$product_id . "'"); } // QuantityMod - FINISH editing switch ($action) { case 'add_product_options': $products_options_id = tep_db_prepare_input($HTTP_POST_VARS['products_options_id']); $option_name_array = $HTTP_POST_VARS['option_name']; for ($i=0, $n=sizeof($languages); $i<$n; $i ++) { $option_name = tep_db_prepare_input($option_name_array[$languages[$i]['id']]); tep_db_query("insert into " . TABLE_PRODUCTS_OPTIONS . " (products_options_id, products_options_name, language_id) values ('" . (int)$products_options_id . "', '" . tep_db_input($option_name) . "', '" . (int)$languages[$i]['id'] . "')"); } tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info)); break; case 'add_product_option_values': $value_name_array = $HTTP_POST_VARS['value_name']; $value_id = tep_db_prepare_input($HTTP_POST_VARS['value_id']); $option_id = tep_db_prepare_input($HTTP_POST_VARS['option_id']); // sortoptionvalues - Insert the following line $values_sortorder = tep_db_prepare_input($HTTP_POST_VARS['values_sortorder']); // sortoptionvalues_eof for ($i=0, $n=sizeof($languages); $i<$n; $i ++) { $value_name = tep_db_prepare_input($value_name_array[$languages[$i]['id']]); // sortoptionvalues - Modify the following line tep_db_query("insert into " . TABLE_PRODUCTS_OPTIONS_VALUES . " (products_options_values_id, language_id, products_options_values_name) values ('" . (int)$value_id . "', '" . (int)$languages[$i]['id'] . "', '" . tep_db_input($value_name) . "')"); // sortoptionvalues_eof } tep_db_query("insert into " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " (products_options_id, products_options_values_id) values ('" . (int)$option_id . "', '" . (int)$value_id . "')"); tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info)); break; case 'add_product_attributes': $products_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']); $options_id = tep_db_prepare_input($HTTP_POST_VARS['options_id']); $values_id = tep_db_prepare_input($HTTP_POST_VARS['values_id']); $value_price = tep_db_prepare_input($HTTP_POST_VARS['value_price']); // QuantityMod - BEGIN editing $value_quantity = tep_db_prepare_input($HTTP_POST_VARS['value_quantity']); // QuantityMod - FINISH editing $price_prefix = tep_db_prepare_input($HTTP_POST_VARS['price_prefix']); // QuantityMod - BEGIN editing tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values ('', '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "', '" . (int)$value_quantity . "')"); update_stock($products_id); // QuantityMod - FINISH editing if (DOWNLOAD_ENABLED == 'true') { $products_attributes_id = tep_db_insert_id(); $products_attributes_filename = tep_db_prepare_input($HTTP_POST_VARS['products_attributes_filename']); $products_attributes_maxdays = tep_db_prepare_input($HTTP_POST_VARS['products_attributes_maxdays']); $products_attributes_maxcount = tep_db_prepare_input($HTTP_POST_VARS['products_attributes_maxcount']); if (tep_not_null($products_attributes_filename)) { tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " values (" . (int)$products_attributes_id . ", '" . tep_db_input($products_attributes_filename) . "', '" . tep_db_input($products_attributes_maxdays) . "', '" . tep_db_input($products_attributes_maxcount) . "')"); } } tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info)); break; case 'update_option_name': $option_name_array = $HTTP_POST_VARS['option_name']; $option_id = tep_db_prepare_input($HTTP_POST_VARS['option_id']); for ($i=0, $n=sizeof($languages); $i<$n; $i ++) { $option_name = tep_db_prepare_input($option_name_array[$languages[$i]['id']]); tep_db_query("update " . TABLE_PRODUCTS_OPTIONS . " set products_options_name = '" . tep_db_input($option_name) . "' where products_options_id = '" . (int)$option_id . "' and language_id = '" . (int)$languages[$i]['id'] . "'"); } tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info)); break; case 'update_value': $value_name_array = $HTTP_POST_VARS['value_name']; $value_id = tep_db_prepare_input($HTTP_POST_VARS['value_id']); $option_id = tep_db_prepare_input($HTTP_POST_VARS['option_id']); // sortoptionvalues - Insert the following line $values_sortorder = tep_db_prepare_input($HTTP_POST_VARS['values_sortorder']); // sortoptionvalues_eof for ($i=0, $n=sizeof($languages); $i<$n; $i ++) { $value_name = tep_db_prepare_input($value_name_array[$languages[$i]['id']]); // sortoptionvalues - Modify the following line tep_db_query("update " . TABLE_PRODUCTS_OPTIONS_VALUES . " set products_options_values_name = '" . tep_db_input($value_name) . "', products_options_values_sortorder = '" . tep_db_input($values_sortorder) . "' where products_options_values_id = '" . tep_db_input($value_id) . "' and language_id = '" . (int)$languages[$i]['id'] . "'"); // sortoptionvalues_eof } tep_db_query("update " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " set products_options_id = '" . (int)$option_id . "' where products_options_values_id = '" . (int)$value_id . "'"); tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info)); break; case 'update_product_attribute': $products_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']); $options_id = tep_db_prepare_input($HTTP_POST_VARS['options_id']); $values_id = tep_db_prepare_input($HTTP_POST_VARS['values_id']); $value_price = tep_db_prepare_input($HTTP_POST_VARS['value_price']); // QuantityMod - BEGIN editing $value_quantity = tep_db_prepare_input($HTTP_POST_VARS['value_quantity']); // QuantityMod - FINISH editing $price_prefix = tep_db_prepare_input($HTTP_POST_VARS['price_prefix']); $attribute_id = tep_db_prepare_input($HTTP_POST_VARS['attribute_id']); // QuantityMod - BEGIN editing tep_db_query("update " . TABLE_PRODUCTS_ATTRIBUTES . " set products_id = '" . (int)$products_id . "', options_id = '" . (int)$options_id . "', options_values_id = '" . (int)$values_id . "', options_values_price = '" . tep_db_input($value_price) . "', price_prefix = '" . tep_db_input($price_prefix) . "', options_quantity = '" . (int)$value_quantity . "' where products_attributes_id = '" . (int)$attribute_id . "'"); update_stock($products_id); // QuantityMod - FINISH editing if (DOWNLOAD_ENABLED == 'true') { $products_attributes_filename = tep_db_prepare_input($HTTP_POST_VARS['products_attributes_filename']); $products_attributes_maxdays = tep_db_prepare_input($HTTP_POST_VARS['products_attributes_maxdays']); $products_attributes_maxcount = tep_db_prepare_input($HTTP_POST_VARS['products_attributes_maxcount']); if (tep_not_null($products_attributes_filename)) { tep_db_query("replace into " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " set products_attributes_id = '" . (int)$attribute_id . "', products_attributes_filename = '" . tep_db_input($products_attributes_filename) . "', products_attributes_maxdays = '" . tep_db_input($products_attributes_maxdays) . "', products_attributes_maxcount = '" . tep_db_input($products_attributes_maxcount) . "'"); } } tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info)); break; case 'delete_option': $option_id = tep_db_prepare_input($HTTP_GET_VARS['option_id']); tep_db_query("delete from " . TABLE_PRODUCTS_OPTIONS . " where products_options_id = '" . (int)$option_id . "'"); tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info)); break; case 'delete_value': $value_id = tep_db_prepare_input($HTTP_GET_VARS['value_id']); tep_db_query("delete from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where products_options_values_id = '" . (int)$value_id . "'"); tep_db_query("delete from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where products_options_values_id = '" . (int)$value_id . "'"); tep_db_query("delete from " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " where products_options_values_id = '" . (int)$value_id . "'"); tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info)); break; case 'delete_attribute': $attribute_id = tep_db_prepare_input($HTTP_GET_VARS['attribute_id']); // QuantityMod - BEGIN editing $get_products_id_query = tep_db_query("select products_id from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_attributes_id='" . (int)$attribute_id . "'"); $get_products_id = tep_db_fetch_array($get_products_id_query); // QuantityMod - FINISH editing tep_db_query("delete from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_attributes_id = '" . (int)$attribute_id . "'"); // QuantityMod - BEGIN editing update_stock($get_products_id['products_id']); // QuantityMod - FINISH editing // added for DOWNLOAD_ENABLED. Always try to remove attributes, even if downloads are no longer enabled tep_db_query("delete from " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " where products_attributes_id = '" . (int)$attribute_id . "'"); tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info)); break; } } ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>>
  8. HELP!!! I have just installed the Sort Option Values Module 1.0 contribution and all went great until I went to my product attributes in Admin. The code breaks at the Option Values section of the Product attributes page. This is the error I get: 1054 - Unknown column 'pov.products_options_values_sortorder' in 'field list' select pov.products_options_values_id, pov.products_options_values_name, pov.products_options_values_sortorder, pov2po.products_options_id from products_options_values pov left join products_options_values_to_products_options pov2po on pov.products_options_values_id = pov2po.products_options_values_id where pov.language_id = '1' order by pov2po.products_options_id, pov.products_options_values_sortorder, pov.products_options_values_id [TEP STOP] After doing some research for about 2 days I tried some of the fixes I saw for problems like this. I tried putting the parentheses after the from and before the pov left join. After I did this in 2 places I get this error: 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 'pov left join products_options_values_to_products_options pov2po on pov.products' at line 1 select pov.products_options_values_id, pov.products_options_values_name, pov.products_options_values_sortorder, pov2po.products_options_id from (products_options_values) pov left join products_options_values_to_products_options pov2po on pov.products_options_values_id = pov2po.products_options_values_id where pov.language_id = '1' order by pov2po.products_options_id, pov.products_options_values_sortorder, pov.products_options_values_id [TEP STOP] I think this is the code it is referring to: // sortoptionvalues - Modify the following line $values = "select pov.products_options_values_id, pov.products_options_values_name, pov.products_options_values_sortorder, pov2po.products_options_id from (" . TABLE_PRODUCTS_OPTIONS_VALUES . ") pov left join " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " pov2po on pov.products_options_values_id = pov2po.products_options_values_id where pov.language_id = '" . (int)$languages_id . "' order by pov2po.products_options_id, pov.products_options_values_sortorder, pov.products_options_values_id"; // sortoptionvalues_eof I changed the highlighted part. The parentheses were not there in the original contribution code. The other piece of code is this: <?php $per_page = MAX_ROW_LISTS_OPTIONS; $attributes = "select pa.* from (" . TABLE_PRODUCTS_ATTRIBUTES . ") pa left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on pa.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by pd.products_name"; $attribute_query = tep_db_query($attributes); Again, I modded the highlighted. I do not believe this text is what is causing the error since it is the original OSC code. Any have any suggestions! I am doing a lot of reading but I am just a beginner and this seems to me like it in next level stuff!!!!!!!!!!!!!!
  9. Iwant2Lrn

    Seperate Pricing Per Customer v3.5

    Does anyone know if Easypopulate will works if you are using SPPC, Hide prices.., Price breaks.., Show price list, and specials by category installed? I have many other mods as well but the SPPC mods have some heavy hacking involved that I don't want to break. I guess I am finding out that the order in which you add you mods will become extremely important as you add more and more. I should have added EP before adding all the incredibly useful SPPC suite mods!!! Any help would be greatly appreciated!
  10. Iwant2Lrn

    USPS Methods_2.8

    I am also getting this error. I enabled the embedded hook (like the instructions said) and it sends me this error through email. <?xml version="1.0"?> <Error><Number>-2147219086</Number><Source>Rate_Respond ;SolServerRates.Rate_Respond</Source><Description>Missing Package element</Description><HelpFile></HelpFile><HelpContext>1 000440</HelpContext></Error> Does anyone know what this means?
  11. Iwant2Lrn

    Seperate Pricing Per Customer v3.5

    You do not have to use the new database. I had the same problem when my webhost went to MySQL 5. You should be able to backup your db and after you load up the new db, just drop in you backup and everything should be back. Hope that works for you!
  12. Iwant2Lrn

    Seperate Pricing Per Customer v3.5

    Are you serious!!!! I thought that this was the main reason for using Easy populate. I really need to be able to update the attributes easily. I guess I will have to find something else to update the attributes. :blink: 2 quick questions: 1. Does the quick updates for SPPC allow you to enter a qty for each product attribute? 2. If not, anyone have any suggestions as to a good mod to allow quantities for product attributes?
  13. Iwant2Lrn

    Seperate Pricing Per Customer v3.5

    Ok! That's what i wanted to know. That's not a big deal to me! I can do the pricing from admin. Its the attributes that I don't like doing from admin. :angry: Thanks!
  14. Afetr about 5 hours I found my problem but still not sure about the last rev of the this mod. It is supposed to be for people using Information Pages Unlimited but EP does not seem to recognize the new infobox format. Anyone else had an issue with this?
  15. Iwant2Lrn

    cDynamic Meta Tags

    OK! Cool! I will proceed on then! Thanks!
  16. After installing EP v2.78 I am trying to test it out, as instructed, and I was able to download the files but this is the message I get when trying to upload: Forbidden You don't have permission to access /onlinestore/catalog/admin/easypopulate.php on this server. Apache/1.3.33 Ben-SSL/1.55 Server at www.bnm-group.com Port 80 I have read through the forum and have tried the recommendations but none have worked for me. Not sure why it is only showing this portion of the path but... Any ideas?
  17. Iwant2Lrn

    Seperate Pricing Per Customer v3.5

    I think I need a little help with this one. Is anyone modded EasyPopulate with SPPC, Price Breaks, Hide Prices, and Show Price list? I am using the SPPC mods and tried to add the easy populate but the prices did not come through. Any ideas?
  18. Iwant2Lrn

    cDynamic Meta Tags

    May be no real issue but one question about the instructions. Step 1 says to upload: -> includes/functions/meta_tags.php should be uploaded to your *catalog*/includes/ directory In the included files there is only a: includes/functions/meta.php file. Will this cause any problems?
  19. Iwant2Lrn

    Seperate Pricing Per Customer v3.5

    I Modified the priceformatter.php. It seems to work like a charm now! Again, thanks for all you help!
  20. Iwant2Lrn

    Seperate Pricing Per Customer v3.5

    No Problem! Like I said this contribution is very useful to me. I appreciate you putting it out there and helping me get it working for me. It is working perfectly!!! :D
  21. Iwant2Lrn

    Seperate Pricing Per Customer v3.5

    Ok! Here it is! <?php /* $Id: PriceFormatter.php,v 1.6 2003/06/25 08:29:26 petri Exp $ adapted for Separate Pricing Per Customer v4 2005/03/20 including an optimization to avoid double queries for the same info adapted for Separate Pricing Per Customer v4.1, Hide products from groups mod 2005/03/28 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 */ /* PriceFormatter.php - module to support quantity pricing Created 2003, Beezle Software based on some code mods by WasaLab Oy (Thanks!) */ class PriceFormatter { var $hiPrice; var $lowPrice; var $quantity; var $hasQuantityPrice; function PriceFormatter($prices=NULL) { $this->productsID = -1; $this->hasQuantityPrice=false; $this->hasSpecialPrice=false; $this->hiPrice=-1; $this->lowPrice=-1; for ($i=1; $i<=8; $i++){ $this->quantity[$i] = -1; $this->prices[$i] = -1; } $this->thePrice = -1; $this->specialPrice = -1; $this->qtyBlocks = 1; // BOF add customer_group_id/list price // add list price: $this->listPrice = ''; $this->cg_id = '0'; // customer_group_id // EOF add customer_group_id/list price if($prices) $this->parse($prices); } function encode() { $str = $this->productsID . ":" . (($this->hasQuantityPrice == true) ? "1" : "0") . ":" . (($this->hasSpecialPrice == true) ? "1" : "0") . ":" . $this->quantity[1] . ":" . $this->quantity[2] . ":" . $this->quantity[3] . ":" . $this->quantity[4] . ":" . $this->quantity[5] . ":" . $this->quantity[6] . ":" . $this->quantity[7] . ":" . $this->quantity[8] . ":" . $this->price[1] . ":" . $this->price[2] . ":" . $this->price[3] . ":" . $this->price[4] . ":" . $this->price[5] . ":" . $this->price[6] . ":" . $this->price[7] . ":" . $this->price[8] . ":" . $this->thePrice . ":" . $this->specialPrice . ":" . $this->qtyBlocks . ":" . $this->taxClass; return $str; } function decode($str) { list($this->productsID, $this->hasQuantityPrice, $this->hasSpecialPrice, $this->quantity[1], $this->quantity[2], $this->quantity[3], $this->quantity[4], $this->quantity[5], $this->quantity[6], $this->quantity[7], $this->quantity[8], $this->price[1], $this->price[2], $this->price[3], $this->price[4], $this->price[5], $this->price[6], $this->price[7], $this->price[8], $this->thePrice, $this->specialPrice, $this->qtyBlocks, $this->taxClass) = explode(":", $str); $this->hasQuantityPrice = (($this->hasQuantityPrice == 1) ? true : false); $this->hasSpecialPrice = (($this->hasSpecialPrice == 1) ? true : false); } function parse($prices) { $this->productsID = $prices['products_id']; $this->hasQuantityPrice=false; $this->hasSpecialPrice=false; $this->quantity[1]=$prices['products_price1_qty']; $this->quantity[2]=$prices['products_price2_qty']; $this->quantity[3]=$prices['products_price3_qty']; $this->quantity[4]=$prices['products_price4_qty']; $this->quantity[5]=$prices['products_price5_qty']; $this->quantity[6]=$prices['products_price6_qty']; $this->quantity[7]=$prices['products_price7_qty']; $this->quantity[8]=$prices['products_price8_qty']; $this->thePrice=$prices['products_price']; $this->specialPrice=$prices['specials_new_products_price']; $this->hasSpecialPrice=tep_not_null($this->specialPrice); $this->price[1]=$prices['products_price1']; $this->price[2]=$prices['products_price2']; $this->price[3]=$prices['products_price3']; $this->price[4]=$prices['products_price4']; $this->price[5]=$prices['products_price5']; $this->price[6]=$prices['products_price6']; $this->price[7]=$prices['products_price7']; $this->price[8]=$prices['products_price8']; /* Change support special prices If any price level has a price greater than the special price lower it to the special price */ if ($this->hasSpecialPrice == true) { for($i=1; $i<=8; $i++) { if ($this->price[$i] > $this->specialPrice) $this->price[$i] = $this->specialPrice; } } //end changes to support special prices $this->qtyBlocks=$prices['products_qty_blocks']; $this->taxClass=$prices['products_tax_class_id']; if ($this->quantity[1] > 0) { $this->hasQuantityPrice = true; $this->hiPrice = $this->thePrice; $this->lowPrice = $this->thePrice; for($i=1; $i<=8; $i++) { if($this->quantity[$i] > 0) { if ($this->price[$i] > $this->hiPrice) { $this->hiPrice = $this->price[$i]; } if ($this->price[$i] < $this->lowPrice) { $this->lowPrice = $this->price[$i]; } } } } // BOF add customer_group_id/list price global $sppc_customer_group_id; if(!tep_session_is_registered('sppc_customer_group_id')) { $this->cg_id = '0'; } else { $this->cg_id = $sppc_customer_group_id; } $this->listPrice = $prices['list_price']; // EOF add customer_group_id/list price } // function loadProductSppc is Separate Pricing Per Customer only function loadProductSppc($product_id, $language_id=1, $product_info) { global $sppc_customer_group_id; if(!tep_session_is_registered('sppc_customer_group_id')) { $customer_group_id = '0'; } else { $customer_group_id = $sppc_customer_group_id; } // BOF add List Price (retail price) to the product_info array $product_info['list_price'] = $product_info['products_price']; // EOF add List Price if ($customer_group_id != '0') { $customer_group_price_query = tep_db_query("select customers_group_price, products_price1, products_price2, products_price3, products_price4, products_price5, products_price6, products_price7, products_price8, products_price1_qty, products_price2_qty, products_price3_qty, products_price4_qty, products_price5_qty, products_price6_qty, products_price7_qty, products_price8_qty, products_qty_blocks from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$product_id. "' and customers_group_id = '" . $customer_group_id . "'"); if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) { $product_info['products_price']= $customer_group_price['customers_group_price']; for ($i = 1 ; $i < 9 ; $i++) { $product_info['products_price'.$i.''] = $customer_group_price['products_price'.$i.'']; $product_info['products_price'.$i.'_qty'] = $customer_group_price['products_price'.$i.'_qty']; } // end if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) $product_info['products_qty_blocks'] = $customer_group_price['products_qty_blocks']; } else { // there is no price for the item in products_groups: retail price breaks need to nulled for ($i = 1 ; $i < 9 ; $i++) { $product_info['products_price'.$i.''] = '0.0000'; $product_info['products_price'.$i.'_qty'] = '0'; } // end if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) $product_info['products_qty_blocks'] = '1'; } } // end if ($customer_group_id != '0') // now get the specials price for this customer_group and add it to product_info array $special_price_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = " . (int)$product_id . " and status ='1' and customers_group_id = '" . $customer_group_id . "'"); if ($specials_price = tep_db_fetch_array($special_price_query)) { $product_info['specials_new_products_price'] = $specials_price['specials_new_products_price']; } $this->parse($product_info); return $product_info; } function loadProduct($product_id, $language_id=1) { global $sppc_customer_group_id; if(!tep_session_is_registered('sppc_customer_group_id')) { $customer_group_id = '0'; } else { $customer_group_id = $sppc_customer_group_id; } $sql = "select pd.products_name, p.products_model, p.products_image, p.products_id," . " p.products_price, p.products_weight," . " p.products_price1,p.products_price2,p.products_price3,p.products_price4, p.products_price5,p.products_price6,p.products_price7,p.products_price8," . " p.products_price1_qty,p.products_price2_qty,p.products_price3_qty,p.products_pri ce4_qty, p.products_price5_qty,p.products_price6_qty,p.products_price7_qty,p.products_pri ce8_qty," . " p.products_qty_blocks," . " p.products_tax_class_id," . " NULL as specials_new_products_price" . " from " . TABLE_PRODUCTS_DESCRIPTION . " pd," . " " . TABLE_PRODUCTS . " p" . " where p.products_status = '1'" . " and p.products_id = '" . (int)$product_id . "'" . " and pd.products_id = '" . (int)$product_id . "'" . " and pd.language_id = '". (int)$language_id ."'"; $product_info_query = tep_db_query($sql); $product_info = tep_db_fetch_array($product_info_query); // BOF add List Price (retail price) to the product_info array $product_info['list_price'] = $product_info['products_price']; // EOF add List Price if ($customer_group_id != '0') { $customer_group_price_query = tep_db_query("select customers_group_price, products_price1, products_price2, products_price3, products_price4, products_price5, products_price6, products_price7, products_price8, products_price1_qty, products_price2_qty, products_price3_qty, products_price4_qty, products_price5_qty, products_price6_qty, products_price7_qty, products_price8_qty, products_qty_blocks from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$product_id. "' and customers_group_id = '" . $customer_group_id . "'"); if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) { $product_info['products_price']= $customer_group_price['customers_group_price']; for ($i = 1 ; $i < 9 ; $i++) { $product_info['products_price'.$i.''] = $customer_group_price['products_price'.$i.'']; $product_info['products_price'.$i.'_qty'] = $customer_group_price['products_price'.$i.'_qty']; } // end if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) $product_info['products_qty_blocks'] = $customer_group_price['products_qty_blocks']; } else { // there is no price for the item in products_groups: retail price breaks need to nulled for ($i = 1 ; $i < 9 ; $i++) { $product_info['products_price'.$i.''] = '0.0000'; $product_info['products_price'.$i.'_qty'] = '0'; } // end if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) $product_info['products_qty_blocks'] = '1'; } } // end if ($customer_group_id != '0') // now get the specials price for this customer_group and add it to product_info array $special_price_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = " . (int)$product_id . " and status ='1' and customers_group_id = '" . $customer_group_id . "'"); if ($specials_price = tep_db_fetch_array($special_price_query)) { $product_info['specials_new_products_price'] = $specials_price['specials_new_products_price']; } $this->parse($product_info); return $product_info; } function computePrice($qty) { $qty = $this->adjustQty($qty); // Compute base price, taking into account the possibility of a special $price = ($this->hasSpecialPrice === TRUE) ? $this->specialPrice : $this->thePrice; for ($i=1; $i<=8; $i++) if (($this->quantity[$i] > 0) && ($qty >= $this->quantity[$i])) $price = $this->price[$i]; return $price; } function adjustQty($qty) { // Force QTY_BLOCKS granularity $qb = $this->getQtyBlocks(); if ($qty < 1) $qty = 1; if ($qb >= 1) { if ($qty < $qb) $qty = $qb; if (($qty % $qb) != 0) $qty += ($qb - ($qty % $qb)); } return $qty; } function getQtyBlocks() { return $this->qtyBlocks; } function getPrice() { return $this->thePrice; } function getLowPrice() { return $this->lowPrice; } function getHiPrice() { return $this->hiPrice; } function hasSpecialPrice() { return $this->hasSpecialPrice; } function hasQuantityPrice() { return $this->hasQuantityPrice; } function getPriceString($style='productPriceInBox') { global $currencies; // BOF "Hide Price if $0 for "Quantity Price Breaks for SPPC 4.1.1" modification if ($this->thePrice > 0 ) { // EOF "Hide Price if $0 for "Quantity Price Breaks for SPPC 4.1.1" modification if ($this->hasSpecialPrice == true) { $lc_text = '<table align="top" border="1" cellspacing="0" cellpadding="0">'; // BOF add list price NOTE: since only the special price for the customer group // is queried, the retail special price is not known if ($this->cg_id > 0) { $lc_text .= '<tr><td align="center" class=' . $style. ' colspan="2">' . SHOW_PRICE_LIST . $currencies->display_price($this->listPrice, tep_get_tax_rate($this->taxClass)) . '</td></tr>'; } // end if ($this->cg_id > 0) $lc_text .= '<tr><td align="center" class=' . $style. ' colspan="2">'; $lc_text .= ' <s>' . $currencies->display_price($this->thePrice, tep_get_tax_rate($this->taxClass)) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($this->specialPrice, tep_get_tax_rate($this->taxClass)) . '</span> ' .'</td></tr>'; } else { $lc_text = '<table align="top" border="1" cellspacing="0" cellpadding="0">'; // BOF add list price if ($this->cg_id > 0) { $lc_text .= '<tr><td align="center" class=' . $style. ' colspan="2">' . SHOW_PRICE_LIST . $currencies->display_price($this->listPrice, tep_get_tax_rate($this->taxClass)) . '</td></tr>'; } // end if ($this->cg_id > 0) $lc_text .= '<tr><td align="left" class=' . $style. ' colspan="2">'; if ($this->cg_id > 0) { $lc_text .= SHOW_YOUR_PRICE; } $lc_text .= $currencies->display_price($this->thePrice, tep_get_tax_rate($this->taxClass)) . '</td></tr>'; // EOF add list price } // If you want to change the format of the price/quantity table // displayed on the product information page, here is where you do it. if($this->hasQuantityPrice == true) { for($i=1; $i<=8; $i++) { if($this->quantity[$i] > 0) { $lc_text .= '<tr><td class='.$style.'>' . $this->quantity[$i] .'+ </td><td class='.$style.'>' . $currencies->display_price($this->price[$i], tep_get_tax_rate($this->taxClass)) .'</td></tr>'; } } $lc_text .= '</table>'; } else { if ($this->hasSpecialPrice == true) { // BOF add list price $lc_text = ''; if ($this->cg_id > 0) { $lc_text .= '<span class="smallText">' . SHOW_PRICE_LIST; $lc_text .= $currencies->display_price($this->listPrice, tep_get_tax_rate($this->taxClass)); $lc_text .= '</span><br />' . SHOW_PRICE_LIST; } // end if ($this->cg_id > 0) $lc_text .= ' <s>' // EOF add list price . $currencies->display_price($this->thePrice, tep_get_tax_rate($this->taxClass)) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($this->specialPrice, tep_get_tax_rate($this->taxClass)) . '</span> '; } else { // BOF add list price $lc_text = ''; if ($this->cg_id > 0) { $lc_text .= '<span class="smallText">' . SHOW_PRICE_LIST; $lc_text .= $currencies->display_price($this->listPrice, tep_get_tax_rate($this->taxClass)); $lc_text .= '</span><br />' . SHOW_YOUR_PRICE; } // end if ($this->cg_id > 0) $lc_text .= ' ' // EOF add list price . $currencies->display_price($this->thePrice, tep_get_tax_rate($this->taxClass)) . ' '; } } // BOF "Hide Price if $0 for "Quantity Price Breaks for SPPC 4.1.1" modification } else { $lc_text = HIDE_PRICE_INFO ; } // EOF "Hide Price if $0 for "Quantity Price Breaks for SPPC 4.1.1" modification return $lc_text; } function getPriceStringShort() { global $currencies; // BOF "Hide Price if $0 for "Quantity Price Breaks for SPPC 4.1.1" modification if ($this->thePrice > 0 ) { // EOF "Hide Price if $0 for "Quantity Price Breaks for SPPC 4.1.1" modification if ($this->hasSpecialPrice == true) { $lc_text = ' <s>' . $currencies->display_price($this->thePrice, tep_get_tax_rate($this->taxClass)) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($this->specialPrice, tep_get_tax_rate($this->taxClass)) . '</span> '; } else { if($this->hasQuantityPrice == true) { $lc_text = ' ' . $currencies->display_price($this->lowPrice, tep_get_tax_rate($this->taxClass)) . ' - ' . $currencies->display_price($this->hiPrice, tep_get_tax_rate($this->taxClass)) . ' '; } else { $lc_text = ' ' . $currencies->display_price($this->thePrice, tep_get_tax_rate($this->taxClass)) . ' '; } } // BOF "Hide Price if $0 for "Quantity Price Breaks for SPPC 4.1.1" modification } else { $lc_text = HIDE_PRICE_INFO ; } // EOF "Hide Price if $0 for "Quantity Price Breaks for SPPC 4.1.1" modification return $lc_text; } } ?>
  22. Iwant2Lrn

    Seperate Pricing Per Customer v3.5

    Whew! After spending the last 5 hours with my eyes glued to the screen, I have found where I have an issue. I am definitly going to need some help with this one. OK! Here we go! I understand that the Hide Price if $0 for "Quantity Price Breaks for SPPC 4.1.1" contribution is suppose to: 1. hide the product price from desired groups and 2. disable the buy now and add to cart buttons. This is good! But, in the instructions in step 8 you say: ***** ATTENTION ***** But if you use the contribution "Column Product Listing for SPPC v4.1", Modify the product_listing_col.php instead the product_listing.php and do the following : catalog/includes/modules/product_listing_col.php around line 150 replace the following line: $lc_text = ' ' . $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . ' '; with: // BOF "Hide Price if $0 for "Quantity Price Breaks for SPPC 4.1.1" modification // Original code below // $lc_text = ' ' . $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . ' '; $lc_text = ' ' . (($listing[$x]['products_price'] > 0) ? $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) : '') . ' '; // EOF "Hide Price if $0 for "Quantity Price Breaks for SPPC 4.1.1" modification and around line 176 replace the following line: $buy_now_button_array[] = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action','sort')) . 'action=buy_now&products_id=' . $listing[$x]['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW, 'style="padding-top: 5px;"') . '</a> '; $lc_text = ''; // otherwise the price will be shown twice with: // BOF "Hide Price if $0 for "Quantity Price Breaks for SPPC 4.1.1" modification // Original code below // $lc_text = ' ' . $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . ' '; $lc_text = ' ' . (($listing[$x]['products_price'] > 0) ? $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) : '') . ' '; // EOF "Hide Price if $0 for "Quantity Price Breaks for SPPC 4.1.1" modification The highlighted code is the buy now button. For me (i am not sure if anyone else is having this problem) if this is not there, I do not show a buy now button any time for any product. Also, in the highlighted code, the price which I believe to be $lc_text = " will display a price if filled in. In the instructions it says to replace the highlighted section with what is following. The replacement text adds a price field back in. If I comment out the entire replacement code, I do not get a second price field. I also did not replace the $buy now array code but rather added the replacement code below it. This looks like what I should be getting but when I am trying to hide the price/buy button, the buy button is still there. :( The good thing is that it is disabled though. So, any ideas of how I can take the buy now button away from just the products that have a hidden price (for the customers that should not see it only). :huh:
  23. Iwant2Lrn

    Seperate Pricing Per Customer v3.5

    I replaced the product_info.php code. The price is still showing up twice. I guess the issue is with the priceformatter.php because those and the language files are the only ones I changed for show price list. Are you using show price list, SPPC, price break, and hide products togehter? That did fix my issue with the add to cart button. Not sure where to go from here. The code for the show price list cont. seems to only remove my add to cart button. :(
  24. Iwant2Lrn

    Seperate Pricing Per Customer v3.5

    OHH! :-" I thought that once you all came out with a contribution that works with SPPC, that you all added them to you're own sites to make sure they work with all the SPPC conts. I am glad you told me this because I was going to add all the ones that I say that work with SPPC. You all do a good job with the code and instructions. I will go back and remove the show products. I am not really good enough to modify the SPPC code to work othe SPPC conts. Maybe one day!!!! Thanks for the help! Do you think this will solve my add to carts button issue?
  25. Iwant2Lrn

    Seperate Pricing Per Customer v3.5

    No problem! I actually had 2 problems! 1. After adding hide product for SPPC I no longer see my add to cart button on the product info page. This is the case when either someone is logged in or not. Also when qty is 0 or anything else! Also, is there a way to have the price field displayed the stock osc way when no one is logged in and use the priceformatter format when someone is logged in? 2. I think it is product_listing_col.php that is now controlling my display because I did implement the Column Product Listing (for Separate Pricing Per Costomer v4.0) as suggested. It is working. I just get 2 prices. Here is my product_listing_col.php code: <?php /* original: $Id: product_listing.php,v 1.44 2003/06/09 22:49:43 hpdl Exp $ new: product_listing_col.php modified for SPPC 2005/03/10 Adam Bradley corrected for proper HTML 2005/07/10 JanZ */ $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id'); if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <?php } $list_box_contents = array(); if ($listing_split->number_of_rows > 0) { $row = 0; $rows = 0; $column = 0; $listing_query = tep_db_query($listing_split->sql_query); // BOF Separate Pricing per Customer $no_of_listings = tep_db_num_rows($listing_query); // global variable (session) $sppc_customer_group_id -> local variable customer_group_id if(!tep_session_is_registered('sppc_customer_group_id')) { $customer_group_id = '0'; } else { $customer_group_id = $sppc_customer_group_id; } while ($_listing = tep_db_fetch_array($listing_query)) { $listing[] = $_listing; $list_of_prdct_ids[] = $_listing['products_id']; } // next part is a debug feature, when uncommented it will print the info that this module receives /* echo '<pre>'; print_r($listing); echo '</pre>'; */ $select_list_of_prdct_ids = "products_id = '".$list_of_prdct_ids[0]."' "; if ($no_of_listings > 1) { for ($n = 1; $n < count($list_of_prdct_ids); $n++) { $select_list_of_prdct_ids .= "or products_id = '".$list_of_prdct_ids[$n]."' "; } } // get all product prices for products with the particular customer_group_id // however not necessary for customer_group_id = 0 if ($customer_group_id != '0') { $pg_query = tep_db_query("select pg.products_id, customers_group_price as price from " . TABLE_PRODUCTS_GROUPS . " pg where (".$select_list_of_prdct_ids.") and pg.customers_group_id = '".$customer_group_id."' "); // $no_of_pg_products = tep_db_num_rows($pg_query); while ($pg_array = tep_db_fetch_array($pg_query)) { $new_prices[] = array ('products_id' => $pg_array['products_id'], 'products_price' => $pg_array['price'], 'specials_new_products_price' => '', 'final_price' => $pg_array['price']); } for ($x = 0; $x < $no_of_listings; $x++) { // replace products prices with those from customers_group table if(!empty($new_prices)) { for ($i = 0; $i < count($new_prices); $i++) { if( $listing[$x]['products_id'] == $new_prices[$i]['products_id'] ) { $listing[$x]['products_price'] = $new_prices[$i]['products_price']; $listing[$x]['specials_new_products_price'] = $new_prices[$i]['specials_new_products_price']; $listing[$x]['final_price'] = $new_prices[$i]['final_price']; } } } // end if(!empty($new_prices) $listing[$x]['specials_new_products_price'] = ''; // makes sure that a retail specials price doesn't carry over to another customer group $listing[$x]['final_price'] = $listing[$x]['products_price']; // final price should not be the retail special price } // end for ($x = 0; $x < $no_of_listings; $x++) } // end if ($customer_group_id != '0') // an extra query is needed for all the specials $specials_query = tep_db_query("select products_id, specials_new_products_price from " . TABLE_SPECIALS . " where (".$select_list_of_prdct_ids.") and status = '1' and customers_group_id = '" .$customer_group_id. "'"); while ($specials_array = tep_db_fetch_array($specials_query)) { $new_s_prices[] = array ('products_id' => $specials_array['products_id'], 'products_price' => '', 'specials_new_products_price' => $specials_array['specials_new_products_price'] , 'final_price' => $specials_array['specials_new_products_price']); } // add the correct specials_new_products_price and replace final_price for ($x = 0; $x < $no_of_listings; $x++) { if(!empty($new_s_prices)) { for ($i = 0; $i < count($new_s_prices); $i++) { if( $listing[$x]['products_id'] == $new_s_prices[$i]['products_id'] ) { $listing[$x]['specials_new_products_price'] = $new_s_prices[$i]['specials_new_products_price']; $listing[$x]['final_price'] = $new_s_prices[$i]['final_price']; } } } // end if(!empty($new_s_prices) } // end for ($x = 0; $x < $no_of_listings; $x++) // while ($listing = tep_db_fetch_array($listing_query)) { (was original code) // WARNING the code assumes there are three products per row. To use a different number change the number // at line 195: if ($column >= 3) and the code to fill up the table row below that accordingly $counter = $row; $class_for_buy_now = 'class="productListing-odd"'; $list_box_contents[$row] = array('params' => 'class="productListing-odd"'); for ($x = 0; $x < $no_of_listings; $x++) { $rows++; if (($rows/2) == floor($rows/2) && ($row > $counter)) { $list_box_contents[$row] = array('params' => 'class="productListing-even"'); $class_for_buy_now = 'class="productListing-even"'; $counter = $row; } else { if ($row > $counter) { $list_box_contents[$row] = array('params' => 'class="productListing-odd"'); $class_for_buy_now = 'class="productListing-odd"'; $counter = $row; } } $product_contents = array(); for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { $lc_align = ''; switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_align = ''; $lc_text = ' ' . $listing[$x]['products_model'] . ' '; break; case 'PRODUCT_LIST_NAME': $lc_align = ''; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing[$x]['products_id']) . '">' . $listing[$x]['products_name'] . '</a>'; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . $listing[$x]['products_name'] . '</a> '; } break; case 'PRODUCT_LIST_MANUFACTURER': $lc_align = ''; $lc_text = ' <a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing[$x]['manufacturers_id']) . '">' . $listing[$x]['manufacturers_name'] . '</a> '; break; case 'PRODUCT_LIST_PRICE': $lc_align = 'right'; if (tep_not_null($listing[$x]['specials_new_products_price'])) { $lc_text = ' <s>' . $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($listing[$x]['specials_new_products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . '</span> '; } else { // BOF "Hide Price if $0 for "Quantity Price Breaks for SPPC 4.1.1" modification // Original code below // $lc_text = ' ' . $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . ' '; $lc_text = ' ' . (($listing[$x]['products_price'] > 0) ? $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) : '') . ' '; // EOF "Hide Price if $0 for "Quantity Price Breaks for SPPC 4.1.1" modification } break; case 'PRODUCT_LIST_QUANTITY': $lc_align = 'right'; $lc_text = ' ' . $listing[$x]['products_quantity'] . ' '; break; case 'PRODUCT_LIST_WEIGHT': $lc_align = 'right'; $lc_text = ' ' . $listing[$x]['products_weight'] . ' '; break; case 'PRODUCT_LIST_IMAGE': $lc_align = 'center'; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing[$x]['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing[$x]['products_image'], $listing[$x]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing[$x]['products_image'], $listing[$x]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> '; } break; // EOF Separate Pricing per Customer case 'PRODUCT_LIST_BUY_NOW': // BOF "Hide Price if $0 for "Quantity Price Breaks for SPPC 4.1.1" modification // Original code below // $lc_text = ' ' . $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . ' '; $lc_text = ' ' . (($listing[$x]['products_price'] > 0) ? $currencies->display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) : '') . ' '; // EOF "Hide Price if $0 for "Quantity Price Breaks for SPPC 4.1.1" modification break; } $product_contents[] = $lc_text; } $lc_text = implode('<br>', $product_contents); $list_box_contents[$row][$column] = array('align' => 'center', 'params' => 'class="productListing-data"', 'text' => $lc_text); $column ++; if ($x == ($no_of_listings -1)) { // fill up the remainder of the table row with empty cells, assumes three products per row! if ($column == '1') { $list_box_contents[$row][$column + 1] = array('align' => 'center', 'params' => 'class="productListing-data"', 'text' => " "); $column ++; } if ($column == '2') { $list_box_contents[$row][$column + 1] = array('align' => 'center', 'params' => 'class="productListing-data"', 'text' => " "); } } if ($column >= 3 || $x == ($no_of_listings -1) ) { $row ++; // we start a new tr here with $list_box_contents $list_box_contents[$row] = array('params' => $class_for_buy_now); $column = 0; // make sure three tables per row are filled if (sizeof($buy_now_button_array) == 1) { $buy_now_button_array[] = " "; } if (sizeof($buy_now_button_array) == 2) { $buy_now_button_array[] = " "; } foreach ((array)$buy_now_button_array as $column1 => $lc_text1) { $list_box_contents[$row][$column1] = array('align' => 'center', 'params' => 'class="productListing-data"', 'text' => $lc_text1); } unset($buy_now_button_array); $column = 0; $row ++; // $counter is now smaller than $row, a new $list_box_contents[] (table row) will be started } } // end for ($x = 0; $x < $no_of_listings; $x++) new productListingBox($list_box_contents); } else { $list_box_contents = array(); $list_box_contents[0] = array('params' => 'class="productListing-odd"'); $list_box_contents[0][] = array('params' => 'class="productListing-data"', 'text' => TEXT_NO_PRODUCTS); new productListingBox($list_box_contents); } if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <?php } ?>
×