Page 1 of 3 123 LastLast
Results 1 to 10 of 26
  1. #1
    Join Date
    Nov 2006
    Posts
    22
    Plugin Contributions
    0

    Default I can't get correct pricing on my product listings

    Here is a example of how the pricing is shown incorrectly:

    http://www.elegantfragrances.com/ind...ord=gucci+envy

    All ten products on the page have the same price as the very last item on the page. Description and pictures are all accurate, but the pricing is incorrect. If I go through the "specials", "new products" or "all products", I don't have that issue. Pricing is accurate through these links.

    I would greatly appreciate if anyone has an idea how to solve this problem.

    Thanks for your help!!!

  2. #2
    Join Date
    Nov 2006
    Location
    Caracas
    Posts
    114
    Plugin Contributions
    0

    Default Re: I can't get correct pricing on my product listings

    check out you


    ./includes/modules/product_listing.php


    or if you are overrinding

    ./includes/modules/YOURTEMPLATE/product_listing.php


    and check you didnt modify

    case 'PRODUCT_LIST_PRICE':

    maybe when you change the layout you cahnge someting

  3. #3
    Join Date
    Nov 2006
    Posts
    22
    Plugin Contributions
    0

    Default Re: I can't get correct pricing on my product listings

    Thanks for the suggestion, jgamo. I haven't actually touched the product_listing.php. However, I did go back and checked it again to make sure. Here is what I have under PRODUCT_LIST_PRICE:


    case 'PRODUCT_LIST_PRICE':
    $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
    $lc_align = 'right';
    $lc_text = $lc_price;

    Does it look right?

    Thanks again for your help

  4. #4
    Join Date
    Nov 2006
    Posts
    22
    Plugin Contributions
    0

    Default Re: I can't get correct pricing on my product listings

    here is actually the whole product_listing.php:

    <?php/** * product_listing module * * @package modules * @copyright Copyright 2003-2006 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: product_listing.php 4655 2006-10-02 01:02:38Z ajeh $ */if (!defined('IS_ADMIN_FLAG')) { die('Illegal Access');}$show_submit = zen_run_normal();$listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_PRODUCTS_LISTING, 'p.products_id', 'page');$how_many = 0;$list_box_contents[0] = array('params' => 'class="productListing-rowheading"');$zc_col_count_description = 0;$lc_align = '';for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_text = TABLE_HEADING_MODEL; $lc_align = ''; $zc_col_count_description++; break; case 'PRODUCT_LIST_NAME': $lc_text = TABLE_HEADING_PRODUCTS; $lc_align = ''; $zc_col_count_description++; break; case 'PRODUCT_LIST_MANUFACTURER': $lc_text = TABLE_HEADING_MANUFACTURER; $lc_align = ''; $zc_col_count_description++; break; case 'PRODUCT_LIST_PRICE': $lc_text = TABLE_HEADING_PRICE; $lc_align = 'right' . (PRODUCTS_LIST_PRICE_WIDTH > 0 ? '" width="' . PRODUCTS_LIST_PRICE_WIDTH : ''); $zc_col_count_description++; break; case 'PRODUCT_LIST_QUANTITY': $lc_text = TABLE_HEADING_QUANTITY; $lc_align = 'right'; $zc_col_count_description++; break; case 'PRODUCT_LIST_WEIGHT': $lc_text = TABLE_HEADING_WEIGHT; $lc_align = 'right'; $zc_col_count_description++; break; case 'PRODUCT_LIST_IMAGE': $lc_text = TABLE_HEADING_IMAGE; $lc_align = 'center'; $zc_col_count_description++; break; } if ( ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) { $lc_text = zen_create_sort_heading($_GET['sort'], $col+1, $lc_text); } $list_box_contents[0][$col] = array('align' => $lc_align, 'params' => 'class="productListing-heading"', 'text' => $lc_text );}if ($listing_split->number_of_rows > 0) { $rows = 0; $listing = $db->Execute($listing_split->sql_query); $extra_row = 0; while (!$listing->EOF) { $rows++; if ((($rows-$extra_row)/2) == floor(($rows-$extra_row)/2)) { $list_box_contents[$rows] = array('params' => 'class="productListing-even"'); } else { $list_box_contents[$rows] = array('params' => 'class="productListing-odd"'); } $cur_row = sizeof($list_box_contents) - 1; 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->fields['products_model']; break; case 'PRODUCT_LIST_NAME': $lc_align = ''; if (isset($_GET['manufacturers_id'])) { $lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listi ng->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>' ; } else { $lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), ($_GET['cPath'] > 0 ? 'cPath=' . $_GET['cPath'] . '&' : '') . 'products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listi ng->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>'; } break; case 'PRODUCT_LIST_MANUFACTURER': $lc_align = ''; $lc_text = '<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing->fields['manufacturers_id']) . '">' . $listing->fields['manufacturers_name'] . '</a>'; break; case 'PRODUCT_LIST_PRICE': $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />'; $lc_align = 'right'; $lc_text = $lc_price; // more info in place of buy now $lc_button = ''; if (zen_has_product_attributes($listing->fields['products_id']) or PRODUCT_LIST_PRICE_BUY_NOW == '0') { $lc_button = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), ($_GET['cPath'] > 0 ? 'cPath=' . $_GET['cPath'] . '&' : '') . 'products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>'; } else { if (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0) { if ( // not a hide qty box product $listing->fields['products_qty_box_status'] != 0 && // product type can be added to cart zen_get_products_allow_add_to_cart($listing->fields['products_id']) != 'N' && // product is not call for price $listing->fields['product_is_call'] == 0 && // product is in stock or customers may add it to cart anyway ($listing->fields['products_quantity'] > 0 || SHOW_PRODUCTS_SOLD_OUT_IMAGE == 0) ) { $how_many++; } // hide quantity box if ($listing->fields['products_qty_box_status'] == 0) { $lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>'; } else { $lc_button = TEXT_PRODUCT_LISTING_MULTIPLE_ADD_TO_CART . "<input type=\"text\" name=\"products_id[" . $listing->fields['products_id'] . "]\" value=\"0\" size=\"4\" />"; } } else {// qty box with add to cart button if (PRODUCT_LIST_PRICE_BUY_NOW == '2' && $listing->fields['products_qty_box_status'] != 0) { $lc_button= zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($listing->fields['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product&products_id=' . $listing->fields['products_id']), 'post', 'enctype="multipart/form-data"') . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($listing->fields['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_draw_hidden_field('products_id', $listing->fields['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</form>'; } else { $lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>'; } } } $the_button = $lc_button; $products_link = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), ($_GET['cPath'] > 0 ? 'cPath=' . $_GET['cPath'] . '&' : '') . 'products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>'; $lc_text .= '<br />' . zen_get_buy_now_button($listing->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($listing->fields['products_id']); $lc_text .= '<br />' . (zen_get_show_product_switch($listing->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? (zen_get_product_is_always_free_shipping($listing->fields['products_id']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON . '<br />' : '') : ''); break; case 'PRODUCT_LIST_QUANTITY': $lc_align = 'right'; $lc_text = $listing->fields['products_quantity']; break; case 'PRODUCT_LIST_WEIGHT': $lc_align = 'right'; $lc_text = $listing->fields['products_weight']; break; case 'PRODUCT_LIST_IMAGE': $lc_align = 'center'; if ($listing->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) { $lc_text = ''; } else { if (isset($_GET['manufacturers_id'])) { $lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'products_id=' . $listing->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>'; } else { $lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), ($_GET['cPath'] > 0 ? 'cPath=' . $_GET['cPath'] . '&' : '') . 'products_id=' . $listing->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>'; } } break; } $list_box_contents[$rows][$col] = array('align' => $lc_align, 'params' => 'class="productListing-data"', 'text' => $lc_text); } // add description and match alternating colors //if (PRODUCT_LIST_DESCRIPTION > 0) { // $rows++; // if ($extra_row == 1) { // $list_box_description = "productListing-data-description-even"; // $extra_row=0; // } else { // $list_box_description = "productListing-data-description-odd"; // $extra_row=1; // } // $list_box_contents[$rows][] = array('params' => 'class="' . $list_box_description . '" colspan="' . $zc_col_count_description . '"', // 'text' => zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listi ng->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION)); //} $listing->MoveNext(); } $error_categories = false;} 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); $error_categories = true;}if (($how_many > 0 and $show_submit == true and $listing_split->number_of_rows > 0) and (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART == 1 or PRODUCT_LISTING_MULTIPLE_ADD_TO_CART == 3) ) { $show_top_submit_button = true;} else { $show_top_submit_button = false;}if (($how_many > 0 and $show_submit == true and $listing_split->number_of_rows > 0) and (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART >= 2) ) { $show_bottom_submit_button = true;} else { $show_bottom_submit_button = false;} if ($how_many > 0 && PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0 and $show_submit == true and $listing_split->number_of_rows > 0) { // bof: multiple products echo zen_draw_form('multiple_products_cart_quantity', zen_href_link(FILENAME_DEFAULT, zen_get_all_get_params(array('action')) . 'action=multiple_products_add_product'), 'post', 'enctype="multipart/form-data"'); }?>I even compared with the original product_listing.php file from the Zen Cart download and everything looks exact the same.Do you think there is another file that I should be looking at? I don't have any modified template subfolders under the includes/modules.

  5. #5
    Join Date
    Nov 2006
    Location
    Caracas
    Posts
    114
    Plugin Contributions
    0

    Default Re: I can't get correct pricing on my product listings

    look fine but to make that layout you had modifed something

    maybe the function zen_get_products_display_price wich show the price checkout this function al look for


    $show_sale_discount = '';
    if (SHOW_SALE_DISCOUNT_STATUS == '1' and ($display_special_price != 0 or $display_sale_price != 0)) {
    if ($display_sale_price) {
    if (SHOW_SALE_DISCOUNT == 1) {
    if ($display_normal_price != 0) {
    $show_discount_amount = number_format(100 - (($display_sale_price / $display_normal_price) * 100),SHOW_SALE_DISCOUNT_DECIMALS);
    } else {
    $show_discount_amount = '';
    }
    $show_sale_discount = '<span class="productPriceDiscount">' . '<br />' . PRODUCT_PRICE_DISCOUNT_PREFIX . $show_discount_amount . PRODUCT_PRICE_DISCOUNT_PERCENTAGE . '</span>';

    } else {
    $show_sale_discount = '<span class="productPriceDiscount">' . '<br />' . PRODUCT_PRICE_DISCOUNT_PREFIX . $currencies->display_price(($display_normal_price - $display_sale_price), zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . PRODUCT_PRICE_DISCOUNT_AMOUNT . '</span>';
    }
    } else {
    if (SHOW_SALE_DISCOUNT == 1) {
    $show_sale_discount = '<span class="productPriceDiscount">' . '<br />' . PRODUCT_PRICE_DISCOUNT_PREFIX . number_format(100 - (($display_special_price / $display_normal_price) * 100),SHOW_SALE_DISCOUNT_DECIMALS) . PRODUCT_PRICE_DISCOUNT_PERCENTAGE . '</span>';
    } else {
    $show_sale_discount = '<span class="productPriceDiscount">' . '<br />' . PRODUCT_PRICE_DISCOUNT_PREFIX . $currencies->display_price(($display_normal_price - $display_special_price), zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . PRODUCT_PRICE_DISCOUNT_AMOUNT . '</span>';
    }
    }
    }






    maybe the mistake is aat the moment to get the price with the offert price check this out get off the ofert from one product and if the price is ok this should be where the error is

  6. #6
    Join Date
    Nov 2006
    Location
    Caracas
    Posts
    114
    Plugin Contributions
    0

    Default Re: I can't get correct pricing on my product listings

    PD the function is in ./includes/functions/functions_prices.php

  7. #7
    Join Date
    Nov 2006
    Posts
    22
    Plugin Contributions
    0

    Default Re: I can't get correct pricing on my product listings

    I will do that right now and let you know if it works. What is really interesting is that it only happens at the last level of product listing. For example, if I open women's fragrances, then choose "#", then products will list with correct pricing. As soon as I click on 212, which is the last level of this subcategory, all items will have the same price as the last item listed on the page.

    However, if I choose "All Prodcuts", "Specials" or "New Prodcuts", all of the pricing are shown with the correct amounts? I'm really puzzled right now. Let me try your last suggestion and see if it will work.

    Thanks!!!

  8. #8
    Join Date
    Nov 2006
    Posts
    22
    Plugin Contributions
    0

    Default Re: I can't get correct pricing on my product listings

    I just replaced it with your post and I'm stilling having the same problem.

    Here is the link when it displays correct pricing: http://www.elegantfragrances.com/ind...ex&cPath=50_93

    and

    http://www.elegantfragrances.com/ind..._page=specials


    Here is the link when it's not displaying correct pricing:
    http://www.elegantfragrances.com/ind...cPath=50_93_94

    and

    http://www.elegantfragrances.com/ind...dex&cPath=2533

    If you would like, please try it on my website and see if it gives you any clues?

  9. #9
    Join Date
    Nov 2006
    Location
    Caracas
    Posts
    114
    Plugin Contributions
    0

    Default Re: I can't get correct pricing on my product listings

    you are right lets go to find out where the problems is
    .

    1) The first prodoct is always right that mean that is not doing the for each to the price fine. ¿ am i right or not ? That is why in the next page you have a right product because if you have another product is goint to do the same repeat de price

    2) the problems is only in the subcat list no in specials or new products


    let me check for a moment to see if i can find out what is wrong

  10. #10
    Join Date
    Nov 2006
    Location
    Caracas
    Posts
    114
    Plugin Contributions
    0

    Default Re: I can't get correct pricing on my product listings

    do you have this file ??


    ./includes/modules/cerberus-120/product_listing.php

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Can't get rid of "Out of Stock" icon on product listings
    By a7t in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 12 Mar 2010, 05:21 PM
  2. Can't get correct _LRG image to display
    By Hokey in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 7 May 2009, 01:35 PM
  3. How can I get my descriptions in product listings to show hyperlinks I've entered?
    By KiwiBrian in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 20 Sep 2008, 11:10 PM
  4. All product listings - how can i get them to display >1 column per row?
    By widget in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 30 Sep 2007, 08:01 AM
  5. Replies: 5
    Last Post: 1 Jun 2007, 07:41 PM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR