Full service web hosting, great prices and support. Starts at $1.99/month!
Results 1 to 8 of 8

Thread: removing price on new product

  1. #1
    creativeone
    Guest


    Default removing price on new product

    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

  2. #2
    osCMax Developer


    removing price on new product


    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    23,134
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    michael_s     $ 10.00
    Rep Power
    598


    Default RE: removing price on new product

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

  3. #3
    creativeone
    Guest


    Default removing product price

    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. #4
    osCMax Developer


    removing price on new product


    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    23,134
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    michael_s     $ 10.00
    Rep Power
    598


    Default RE: removing product price

    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']))
    The <br>' should remain. The error is caused by removing the single quote.

  5. #5
    creativeone
    Guest


    Default removing product price

    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. #6
    creativeone
    Guest


    Default removing product price

    I got it!!!

    I was removing one to many ). Thanks for your help.
    Cindy

  7. #7
    mikez68
    Guest


    Default

    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. #8
    mikez68
    Guest


    1 out of 1 members found this post helpful.

    Default I got it!!

    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

Similar Threads

  1. Product Net Price vs. Gross Price
    By Sam_Iam in forum osCmax v1.7 Discussion
    Replies: 2
    Last Post: 09-13-2004, 12:38 PM
  2. how do i add shipping price under the product price ?
    By Roy_Shiker in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 09-08-2004, 04:40 AM
  3. Removing price listing from "New Products For ..."
    By JGofGFS in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 03-31-2004, 11:34 AM
  4. Removing 'Customers who bought this product' box
    By Nazdar in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 02-26-2004, 05:56 AM
  5. Product without price?
    By vivo in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 06-10-2003, 02:43 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •