This is a discussion on removing price on new product within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; Hi can someone tell me how to remove the price on the new products section on the home page? I ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| Hi can someone tell me how to remove the price on the new products section on the home page? I have been pulling my hair out trying to find it. Thanks. http://www.globalwaterandair.com/store |
| Sponsored Links | ||
| ||
| |
|
#2
| ||||
| ||||
| Hi, Edit /includes/modules/new_products.php, line 33 and remove the follwing: Code: <br>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id']))
__________________ Michael Sasek osCMax Developer
|
|
#3
| |||
| |||
| Thanks for responding but when I remove that line I get the following: Parse error: parse error, unexpected $ in /home/globalwa/public_html/store/includes/modules/new_products.php on line 45 Any ideas? Thanks. |
|
#4
| ||||
| ||||
| Sorry about that. You should just remove this part: Code: . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id']))
__________________ Michael Sasek osCMax Developer
|
|
#5
| |||
| |||
| Wow that was fast. However - I now get an error that says Parse error: parse error, unexpected T_VARIABLE, expecting ')' in /home/globalwa/public_html/store/includes/modules/new_products.php on line 35 |
|
#6
| |||
| |||
| I got it!!! I was removing one to many ). Thanks for your help. Cindy |
|
#7
| |||
| |||
| I ma having the opposite problem. I have installed osc-max and added a graphic template from Template Shopper. The new products section og the first catalog page does not show prices. The specials section works fine. Any idea's on how to put the prices back? I had tried reinserting what was removed in this post's thread, but kept coming up with parse errors. I am not sure if my syntax was bad or does more need to be inserted? Any help would be appreciated. Thanx. Mike Z /includes/modules/new_products.php is as follows <?php /* $Id: new_products.php,v 1.2 2005/01/16 23:22:23 Michael Sasek Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ ?> <!-- new_products //--> <?php $info_box_contents = array(); // $info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B'))); $info_box_contents[] = array('align' => 'left', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCTS_NEW) . '" class="headerNavigation">' . sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B') . '</a>')); // new contentBoxHeading($info_box_contents); new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_PRODUCTS_NEW)); if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } else { $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } $row = 0; $col = 0; $info_box_contents = array(); while ($new_products = tep_db_fetch_array($new_products_query)) { $new_products['products_name'] = tep_get_products_name($new_products['products_id']); //******* Begin Separate Price per Customer Mod ******** global $customer_id; $customer_group_query = tep_db_query("select customers_group_id from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"); $customer_group = tep_db_fetch_array($customer_group_query); $customer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . $new_products['products_id'] . "' and customers_group_id = '" . $customer_group['customers_group_id'] . "'"); if ( $customer_group['customers_group_id'] != 0) { if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) { $new_products['products_price'] = $customer_group_price['customers_group_price']; } } //******* End Separate Price per Customer Mod ******** $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] .. $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) '</a><br>'); $col ++; if ($col > 2) { $col = 0; $row ++; } } new contentBox($info_box_contents); ?> <!-- new_products_eof //--> |
|
#8
| |||
| |||
| Downloaded beyond compare. Looked at the file from MS2 and compared to MS2MAX. found . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) was the difference and exactly where it needed to be. tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id']))); All good. Hope this can help if someone has the same problem. Mike Z |
| Sponsored Links | ||
| ||
| |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Product Net Price vs. Gross Price | Sam_Iam | osCMax v1.7 Discussion | 2 | 09-13-2004 12:38 PM |
| how do i add shipping price under the product price ? | Roy_Shiker | osCMax v1.7 Discussion | 0 | 09-08-2004 04:40 AM |
| Removing price listing from "New Products For ..." | JGofGFS | osCommerce 2.2 Modification Help | 1 | 03-31-2004 10:34 AM |
| Removing 'Customers who bought this product' box | Nazdar | osCommerce 2.2 Modification Help | 1 | 02-26-2004 04:56 AM |
| Product without price? | vivo | osCommerce 2.2 Modification Help | 0 | 06-10-2003 02:43 PM |