tivolimac Posted February 26, 2014 Share Posted February 26, 2014 Excuse me, wrong info: oscommerce version 2.3.3.4 not 4.3.3.4 Fatigue? Quote Let's build the Metaverse! May the Code be with you! Link to comment Share on other sites More sharing options...
♥joli1811 Posted February 27, 2014 Share Posted February 27, 2014 Hallo to all osc users and the readers of this topic. I'm new to osc so be gentle with me. I am using version 4.3.3.4, php version 5.3.27, provider uses linux. I would like to use this addon (Hide products from customer groups for SPPC, modded version for osc 2.3.1) but after installing I am getting errors concerning deprecated code and others, like the search function not working because a certain function is missing, categories box failed to load etc, etc... I believe it has to do with the fact that the published addon is not fully corrected for osc 2.3.x.x I tried with the little knowledge I have to get it working, reading the suggestions here but in the end I had more errors, so I decided to ask you guys: Is there, some where out there, a really compatible version with 2.3.x.? I'm not a coder just a beginning store owner. I would like to use this addon because it gives SPPC more power and gives me a way to get really started. My setup at the moment: version (was) clean 4.3.3.4 + SPPC 2.3.3.4 Revised + Specials by category And... if I have tredded any rules/guidelines I apologize. Thanks in advance! Hi I think i added the corrected Hide products from customer groups for SPPC to the version of sppc I uploaded it should have hide/specials and the sppc http://addons.oscommerce.com/info/716 Regards Joli Quote To improve is to change; to be perfect is to change often. Link to comment Share on other sites More sharing options...
tivolimac Posted February 27, 2014 Share Posted February 27, 2014 @joli1811 : Thanks for your quick response! The above mentioned package only contains SPPC revised for 2.3.3.4 and SpecialsByCat2_3_3_4 with installation instruction. This package is my starting point and it is working perfect. Thank you (and many others) for this effort! http://addons.oscommerce.com/info/3059,with the part for osC version 2.3.1 (and up I hope), is the addon I am looking at. Administrator can hide at product level/product (page) from categories so groups can not see product. Or hide complete categories (assumption). Sadly not in package addons.oscommerce.com/info/716. And not fully compatible with osC 2.3.(3.4) in my experience. Hence my digital cry for help/guidance/pointers for a working version or instructions to get it working. So, help anyone (more than ...)? Thanks in advance! Quote Let's build the Metaverse! May the Code be with you! Link to comment Share on other sites More sharing options...
♥joli1811 Posted February 27, 2014 Share Posted February 27, 2014 Hi Well must have forgot as far as I remember there were a few deprecated errors in the admin with the hide products nothing major .so if you need a few files just say remember admin/cache.php was one where ereg_replace had to be changed to preg_replace I have a 2.3.3.4 file set/zip here with the x 3 addons combined only problem is info manager and ckeditor are also installed.so you would need to watch The later bug fixes on catalog /_product_info,php and catalog/includes/product_listing.php are possibly not done in the zip file so you would need to take these files from the latest upload. PM me if you want the file set best would be to compare my files with yours admin should be perfect and as said the only ones to check would be the product / product_listing in the catalog/shop part. I just can not remember if they were fixed and the /includes/modules/boxes/bm_categories.php was probably not done as I used a different categories box Regards Joli Quote To improve is to change; to be perfect is to change often. Link to comment Share on other sites More sharing options...
tivolimac Posted February 27, 2014 Share Posted February 27, 2014 @@joli1811 Thanks and shall do Ron Quote Let's build the Metaverse! May the Code be with you! Link to comment Share on other sites More sharing options...
CGhoST Posted May 7, 2014 Share Posted May 7, 2014 (edited) Hi Everyone Maybe i have done something wrong. I have installed this contribution on Oscommerce v2.3.3.4 and believe it is successfully installed. My question is: For retail group the products on special are shown even after the customer is logged in. If a different group (Not retail) is logged in then the specials are removed and normal price is shown. Is this normal behavior? Because i would understand that if a product is on special irrespective of the group it would be available on it. Doesn't make sense anyone would pay normal price for a product which is on special. Also if this is normal behavior then is there a way for a check to see if items are on special cheaper then the price set per group. If special cheaper then display special price otherwise normal group price. Could someone please help with this? All help is much appreciated. Edited May 7, 2014 by CGhoST Quote Link to comment Share on other sites More sharing options...
♥joli1811 Posted May 7, 2014 Share Posted May 7, 2014 Now interesting question may be a bug not sure but I have just tested using the additional specials by category contribution and was able to drill down to specific products in the wholesale group using categorys and manufacture filter that is there . Then I was able to control the special price on individual products in that category and in the test case wholesale group 10% discount worked fine on a specific product including the red line to indicate special.. The specials by category was in the sppc package I uploaded and is a really quick simple install (compared to sppc ;) ) so no guarantee but think that will fix your problem a bit tedious maybe having to redo the special extra for the wholesale/other groups but as far as I have tested it may solve your problem. Regards Joli PS: Really not sure if it is a bug but on my version I see no way to distinguish the groups as regards specials!! Quote To improve is to change; to be perfect is to change often. Link to comment Share on other sites More sharing options...
CGhoST Posted May 7, 2014 Share Posted May 7, 2014 i had an old version installed v4.2.2 For v2.3.2 and the outcome is the same. So maybe it is the functionality of this contribution and not a bug. So basically if i understand this right then i should not use the special module that comes with Oscommerce and use specials by category contribution. Thank you for all your help and prompt reply John. Quote Link to comment Share on other sites More sharing options...
CGhoST Posted May 7, 2014 Share Posted May 7, 2014 Another Question :) How can i do it so that the amount i am entering for separate group pricing is including tax and not gross amount. How can do the same for specials for categories. Thanks so much Quote Link to comment Share on other sites More sharing options...
♥joli1811 Posted May 7, 2014 Share Posted May 7, 2014 The tax settings for the various groups are in the customers groups in admin. Now I am no expert as I have not used this as shop owner but if you have problems with the available settings/options you could also consider setting up a new Tax Classes in locations and taxes in admin this will then appear as an extra variable/option in the customer groups fields The special for categories should reflect the settings that have been made in the customer groups so should be no problem there if you can get the groups right. Quote To improve is to change; to be perfect is to change often. Link to comment Share on other sites More sharing options...
CGhoST Posted May 7, 2014 Share Posted May 7, 2014 I have the tax class setup and it works fine. The problem i have is when you go editing a product and putting in the seperate group prices. I need to minus the tax from the RRP and put that in the field. Just trying to avoid this extra calculation and was hoping to just enter the net price rather than gross price Quote Link to comment Share on other sites More sharing options...
♥joli1811 Posted May 7, 2014 Share Posted May 7, 2014 Will check again on my demo later today or tomorrow just up to my eyes in it at the minute Quote To improve is to change; to be perfect is to change often. Link to comment Share on other sites More sharing options...
L. Haase Posted May 20, 2014 Share Posted May 20, 2014 I have done a search here for my issue of my up/down arrows not showing (I am only getting the text from "catalog/admin/includes/languages/english/customers.php". I have uploaded the image files to both catalog/images as well as catalog/admin/images with no luck, I still only get the alt text...no arrows. There is another image issue when I go to admin/customers/customers groups (customers_groups.php), the "new group" image is not showing and instead I see the text "+Image_new_group". Everything else seems to work properly. This was an all day affair for me...I still have my altered files up in hopes I can pin point this issue quickly. Any ideas? Quote Link to comment Share on other sites More sharing options...
L. Haase Posted May 20, 2014 Share Posted May 20, 2014 (edited) To show the issue, here is a screen shot. http://aquarian-artisan-bath-body.com/images/sppc-no.images.jpg Edited May 20, 2014 by L. Haase Quote Link to comment Share on other sites More sharing options...
L. Haase Posted May 20, 2014 Share Posted May 20, 2014 Ok, another issue. I have registered my admin email in the mentioned file so that I can get the window that allows me to select either wholesale or retail group however no matter which I select, I am routed back to the login.php. When I look at the source code, I see my email address as well as the password I set up for that account although I do not remember setting the password in english/login.php. Is it supposed to do that? I see nothing about it in the documentation for this file and there is really only 2 edits, simple ones, for that file so I don't see how I could have messed it up. :) Quote Link to comment Share on other sites More sharing options...
plazman65 Posted July 11, 2014 Share Posted July 11, 2014 Hi! Separate Pricing Per Customer v4.2 2007/06/23, Hide products and categories from groups 2008/08/05. Everything is working great but the whats_new box. If I apply the new bm_whats_new page the box disappears. Can someone point me in the right direction? Thanks so much! <?php/* $Id$ adapted for Separate Pricing Per Customer v4.2 2007/08/10, Hide products and categories from groups 2008/08/04 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2010 osCommerce Released under the GNU General Public License*/ class bm_whats_new { var $code = 'bm_whats_new'; var $group = 'boxes'; var $title; var $description; var $sort_order; var $enabled = false; function bm_whats_new() { $this->title = MODULE_BOXES_WHATS_NEW_TITLE; $this->description = MODULE_BOXES_WHATS_NEW_DESCRIPTION; if ( defined('MODULE_BOXES_WHATS_NEW_STATUS') ) { $this->sort_order = MODULE_BOXES_WHATS_NEW_SORT_ORDER; $this->enabled = (MODULE_BOXES_WHATS_NEW_STATUS == 'True'); $this->group = ((MODULE_BOXES_WHATS_NEW_CONTENT_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right'); } } function execute() { global $currencies, $oscTemplate;// BOF Separate Pricing Per Customer/* if ($random_product = tep_random_select("select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and pd.language_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id order by p.products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) { */ // BOF Hide products and categories from groups if ($random_product = tep_random_select("select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_PRODUCTS_TO_CATEGORIES . " using(products_id) left join " . TABLE_CATEGORIES . " using(categories_id) where p.products_status = '1' and pd.language_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id and find_in_set('".$customer_group_id."', products_hide_from_groups) = 0 and find_in_set('" . $customer_group_id . "', categories_hide_from_groups) = 0 order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) { // EOF Hide products and categories from groups// $random_product['products_name'] = tep_get_products_name($random_product['products_id']); $random_product['specials_new_products_price'] = tep_get_products_special_price($random_product['products_id']);// global variable (session) $sppc_customer_group_id -> local variable customer_group_id if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') { $customer_group_id = $_SESSION['sppc_customer_group_id']; } else { $customer_group_id = '0'; } if ($customer_group_id !='0') { $customer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . $random_product['products_id'] . "' and customers_group_id = '" . $customer_group_id . "'"); if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) { $random_product['products_price'] = $customer_group_price['customers_group_price']; } }// EOF Separate Pricing Per Customer if (tep_not_null($random_product['specials_new_products_price'])) { $whats_new_price = '<del>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</del><br />'; $whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>'; } else { $whats_new_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])); } $data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading"><a href="' . tep_href_link(FILENAME_PRODUCTS_NEW) . '">' . MODULE_BOXES_WHATS_NEW_BOX_TITLE . '</a></div>' . ' <div class="ui-widget-content infoBoxContents" style="text-align: center;"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br /><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br />' . $whats_new_price . '</div>' . '</div>'; $oscTemplate->addBlock($data, $this->group); } } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_BOXES_WHATS_NEW_STATUS'); } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable What\'s New Module', 'MODULE_BOXES_WHATS_NEW_STATUS', 'True', 'Do you want to add the module to your shop?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Placement', 'MODULE_BOXES_WHATS_NEW_CONTENT_PLACEMENT', 'Left Column', 'Should the module be loaded in the left or right column?', '6', '1', 'tep_cfg_select_option(array(\'Left Column\', \'Right Column\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_BOXES_WHATS_NEW_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_BOXES_WHATS_NEW_STATUS', 'MODULE_BOXES_WHATS_NEW_CONTENT_PLACEMENT', 'MODULE_BOXES_WHATS_NEW_SORT_ORDER'); } }?> Quote Link to comment Share on other sites More sharing options...
♥joli1811 Posted July 11, 2014 Share Posted July 11, 2014 Hi Try the one attached Regards Joli bm_whats_new.php Quote To improve is to change; to be perfect is to change often. Link to comment Share on other sites More sharing options...
plazman65 Posted July 11, 2014 Share Posted July 11, 2014 Hi Try the one attached Regards Joli thanks but it disappeared again :( Quote Link to comment Share on other sites More sharing options...
♥joli1811 Posted July 11, 2014 Share Posted July 11, 2014 Did you uninstall the module first in admin and then reinstall ?? if not do so and check your /includes/languages/english/modules/boxes/bm_whats_new.php best just upload a fresh copy Regards Joli Quote To improve is to change; to be perfect is to change often. Link to comment Share on other sites More sharing options...
plazman65 Posted July 12, 2014 Share Posted July 12, 2014 Did you uninstall the module first in admin and then reinstall ?? if not do so and check your /includes/languages/english/modules/boxes/bm_whats_new.php best just upload a fresh copy Regards Joli Yes I did.. its so strange especially because everything else works perfect. Here is my existing one in case that may help give a clue to what Im doing wrong? <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2010 osCommerce Released under the GNU General Public License */ class bm_whats_new { var $code = 'bm_whats_new'; var $group = 'boxes'; var $title; var $description; var $sort_order; var $enabled = false; function bm_whats_new() { $this->title = MODULE_BOXES_WHATS_NEW_TITLE; $this->description = MODULE_BOXES_WHATS_NEW_DESCRIPTION; if ( defined('MODULE_BOXES_WHATS_NEW_STATUS') ) { $this->sort_order = MODULE_BOXES_WHATS_NEW_SORT_ORDER; $this->enabled = (MODULE_BOXES_WHATS_NEW_STATUS == 'True'); $this->group = ((MODULE_BOXES_WHATS_NEW_CONTENT_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right'); } } function execute() { global $currencies, $oscTemplate; if ($random_product = tep_random_select("select products_id, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS . " where products_status = '1' order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) { $random_product['products_name'] = tep_get_products_name($random_product['products_id']); $random_product['specials_new_products_price'] = tep_get_products_special_price($random_product['products_id']); if (tep_not_null($random_product['specials_new_products_price'])) { $whats_new_price = '<del>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</del><br />'; $whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>'; } else { $whats_new_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])); } $data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading"><a href="' . tep_href_link(FILENAME_PRODUCTS_NEW) . '">' . MODULE_BOXES_WHATS_NEW_BOX_TITLE . '</a></div>' . ' <div class="ui-widget-content infoBoxContents" style="text-align: center;"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br /><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br />' . $whats_new_price . '</div>' . '</div>'; $oscTemplate->addBlock($data, $this->group); } } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_BOXES_WHATS_NEW_STATUS'); } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable What\'s New Module', 'MODULE_BOXES_WHATS_NEW_STATUS', 'True', 'Do you want to add the module to your shop?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Placement', 'MODULE_BOXES_WHATS_NEW_CONTENT_PLACEMENT', 'Left Column', 'Should the module be loaded in the left or right column?', '6', '1', 'tep_cfg_select_option(array(\'Left Column\', \'Right Column\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_BOXES_WHATS_NEW_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_BOXES_WHATS_NEW_STATUS', 'MODULE_BOXES_WHATS_NEW_CONTENT_PLACEMENT', 'MODULE_BOXES_WHATS_NEW_SORT_ORDER'); } } ?> Quote Link to comment Share on other sites More sharing options...
♥joli1811 Posted July 12, 2014 Share Posted July 12, 2014 You seem to be missing code still in includes/modules/boxes/bm_whats_new.php try this code <?php /* $Id$ adapted for Separate Pricing Per Customer v4.2 2007/08/10, Hide products and categories from groups 2008/08/04 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ class bm_whats_new { var $code = 'bm_whats_new'; var $group = 'boxes'; var $title; var $description; var $sort_order; var $enabled = false; function bm_whats_new() { $this->title = MODULE_BOXES_WHATS_NEW_TITLE; $this->description = MODULE_BOXES_WHATS_NEW_DESCRIPTION; if ( defined('MODULE_BOXES_WHATS_NEW_STATUS') ) { $this->sort_order = MODULE_BOXES_WHATS_NEW_SORT_ORDER; $this->enabled = (MODULE_BOXES_WHATS_NEW_STATUS == 'True'); $this->group = ((MODULE_BOXES_WHATS_NEW_CONTENT_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right'); } } function execute() { global $currencies, $oscTemplate; // BOF Separate Pricing Per Customer /* if ($random_product = tep_random_select("select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and pd.language_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id order by p.products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) { */ // BOF Hide products and categories from groups if ($random_product = tep_random_select("select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_PRODUCTS_TO_CATEGORIES . " using(products_id) left join " . TABLE_CATEGORIES . " using(categories_id) where p.products_status = '1' and pd.language_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id and find_in_set('".$customer_group_id."', products_hide_from_groups) = 0 and find_in_set('" . $customer_group_id . "', categories_hide_from_groups) = 0 order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) { // EOF Hide products and categories from groups // $random_product['products_name'] = tep_get_products_name($random_product['products_id']); $random_product['specials_new_products_price'] = tep_get_products_special_price($random_product['products_id']); // global variable (session) $sppc_customer_group_id -> local variable customer_group_id if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') { $customer_group_id = $_SESSION['sppc_customer_group_id']; } else { $customer_group_id = '0'; } if ($customer_group_id !='0') { $customer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . $random_product['products_id'] . "' and customers_group_id = '" . $customer_group_id . "'"); if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) { $random_product['products_price'] = $customer_group_price['customers_group_price']; } } // EOF Separate Pricing Per Customer if (tep_not_null($random_product['specials_new_products_price'])) { $whats_new_price = '<del>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</del><br />'; $whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>'; } else { $whats_new_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])); } $data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading"><a href="' . tep_href_link(FILENAME_PRODUCTS_NEW) . '">' . MODULE_BOXES_WHATS_NEW_BOX_TITLE . '</a></div>' . ' <div class="ui-widget-content infoBoxContents" style="text-align: center;"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br /><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br />' . $whats_new_price . '</div>' . '</div>'; $oscTemplate->addBlock($data, $this->group); } } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_BOXES_WHATS_NEW_STATUS'); } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable What\'s New Module', 'MODULE_BOXES_WHATS_NEW_STATUS', 'True', 'Do you want to add the module to your shop?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Placement', 'MODULE_BOXES_WHATS_NEW_CONTENT_PLACEMENT', 'Left Column', 'Should the module be loaded in the left or right column?', '6', '1', 'tep_cfg_select_option(array(\'Left Column\', \'Right Column\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_BOXES_WHATS_NEW_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_BOXES_WHATS_NEW_STATUS', 'MODULE_BOXES_WHATS_NEW_CONTENT_PLACEMENT', 'MODULE_BOXES_WHATS_NEW_SORT_ORDER'); } } ?> Quote To improve is to change; to be perfect is to change often. Link to comment Share on other sites More sharing options...
plazman65 Posted July 12, 2014 Share Posted July 12, 2014 (edited) You seem to be missing code still in includes/modules/boxes/bm_whats_new.php try this code <?php /* $Id$ adapted for Separate Pricing Per Customer v4.2 2007/08/10, Hide products and categories from groups 2008/08/04 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ class bm_whats_new { var $code = 'bm_whats_new'; var $group = 'boxes'; var $title; var $description; var $sort_order; var $enabled = false; function bm_whats_new() { $this->title = MODULE_BOXES_WHATS_NEW_TITLE; $this->description = MODULE_BOXES_WHATS_NEW_DESCRIPTION; if ( defined('MODULE_BOXES_WHATS_NEW_STATUS') ) { $this->sort_order = MODULE_BOXES_WHATS_NEW_SORT_ORDER; $this->enabled = (MODULE_BOXES_WHATS_NEW_STATUS == 'True'); $this->group = ((MODULE_BOXES_WHATS_NEW_CONTENT_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right'); } } function execute() { global $currencies, $oscTemplate; // BOF Separate Pricing Per Customer /* if ($random_product = tep_random_select("select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and pd.language_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id order by p.products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) { */ // BOF Hide products and categories from groups if ($random_product = tep_random_select("select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_PRODUCTS_TO_CATEGORIES . " using(products_id) left join " . TABLE_CATEGORIES . " using(categories_id) where p.products_status = '1' and pd.language_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id and find_in_set('".$customer_group_id."', products_hide_from_groups) = 0 and find_in_set('" . $customer_group_id . "', categories_hide_from_groups) = 0 order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) { // EOF Hide products and categories from groups // $random_product['products_name'] = tep_get_products_name($random_product['products_id']); $random_product['specials_new_products_price'] = tep_get_products_special_price($random_product['products_id']); // global variable (session) $sppc_customer_group_id -> local variable customer_group_id if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') { $customer_group_id = $_SESSION['sppc_customer_group_id']; } else { $customer_group_id = '0'; } if ($customer_group_id !='0') { $customer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . $random_product['products_id'] . "' and customers_group_id = '" . $customer_group_id . "'"); if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) { $random_product['products_price'] = $customer_group_price['customers_group_price']; } } // EOF Separate Pricing Per Customer if (tep_not_null($random_product['specials_new_products_price'])) { $whats_new_price = '<del>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</del><br />'; $whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>'; } else { $whats_new_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])); } $data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading"><a href="' . tep_href_link(FILENAME_PRODUCTS_NEW) . '">' . MODULE_BOXES_WHATS_NEW_BOX_TITLE . '</a></div>' . ' <div class="ui-widget-content infoBoxContents" style="text-align: center;"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br /><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br />' . $whats_new_price . '</div>' . '</div>'; $oscTemplate->addBlock($data, $this->group); } } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_BOXES_WHATS_NEW_STATUS'); } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable What\'s New Module', 'MODULE_BOXES_WHATS_NEW_STATUS', 'True', 'Do you want to add the module to your shop?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Placement', 'MODULE_BOXES_WHATS_NEW_CONTENT_PLACEMENT', 'Left Column', 'Should the module be loaded in the left or right column?', '6', '1', 'tep_cfg_select_option(array(\'Left Column\', \'Right Column\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_BOXES_WHATS_NEW_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_BOXES_WHATS_NEW_STATUS', 'MODULE_BOXES_WHATS_NEW_CONTENT_PLACEMENT', 'MODULE_BOXES_WHATS_NEW_SORT_ORDER'); } } ?> No luck it still doesnt show at all.. any other ideas? I really appreciate the help :) I dont know if it helps but I tried it with just the SPPC changes before the hidden stuff is added as well and it disappears there as well. Edited July 12, 2014 by plazman65 Quote Link to comment Share on other sites More sharing options...
♥joli1811 Posted July 12, 2014 Share Posted July 12, 2014 Well the only thing I can think of is that the database entries are somehow corrupt You would need to first uninstall again in admin back up your database then go to phpmyadmin and search the for x 3 entrys in Table: configuration MODULE_BOXES_WHATS_NEW_STATUSMODULE_BOXES_WHATS_NEW_CONTENT_PLACEMENTMODULE_BOXES_WHATS_NEW_SORT_ORDER if they are, they should not be has you removed in admin it means that they are somehow corrupt so Drop the x 3 tables and then reinstall in your admin.. Now remember to do a database back up before any changes in case you make a mistake Quote To improve is to change; to be perfect is to change often. Link to comment Share on other sites More sharing options...
plazman65 Posted July 12, 2014 Share Posted July 12, 2014 Well the only thing I can think of is that the database entries are somehow corrupt You would need to first uninstall again in admin back up your database then go to phpmyadmin and search the for x 3 entrys in Table: configuration MODULE_BOXES_WHATS_NEW_STATUS MODULE_BOXES_WHATS_NEW_CONTENT_PLACEMENT MODULE_BOXES_WHATS_NEW_SORT_ORDER if they are, they should not be has you removed in admin it means that they are somehow corrupt so Drop the x 3 tables and then reinstall in your admin.. Now remember to do a database back up before any changes in case you make a mistake thanks for the help sadly it didnt work. I think I will have to forgo the box darn it Quote Link to comment Share on other sites More sharing options...
plazman65 Posted July 18, 2014 Share Posted July 18, 2014 I hope this is the thread to ask in.. Does anyone know of a sitemap generator that works for SPPC and Hide Products? Thanks for any help :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.