Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Jan 2005
    Posts
    153
    Plugin Contributions
    0

    Default No price in product listing

    This bug concerns the product listing in the admin part of the shop.

    If the following settings are selected :
    Customer Shop Status - View Shop and Prices 1
    Customer Approval Status - Authorization Pending 1

    Then in the categories.php file, under the Price/Special/Sale column, no price at all is displayed - the column is empty, apart for the header.

    This bug was present since at least ZC 1.3.1, and is still here in ZC 1.3.8a. I just could identify the settings causing problems, so I only report it now.

    This error was checked on a freshly installed cart, too.

    Thanks,

    sanji

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: No price in product listing

    How exactly do you want this to work ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Jan 2005
    Posts
    153
    Plugin Contributions
    0

    Default Re: No price in product listing

    Let's try on demo.opensourcecms.com/zencart/admin/login.php !

    In http://demo.opensourcecms.com/zencar...categories.php - create a new product, anything, with any price (I called the product "test", put a price of 100 and a quantity of 100).

    Now, the category link http://demo.opensourcecms.com/zencar...p?cPath=&pID=1 displays the product with its price under the "Price/Special/Sale" column.

    Go to Configuration / Customer Details, and change the "Customer Shop Status - View Shop and Prices" value from 0 to 1.

    Go back to the category listing http://demo.opensourcecms.com/zencar...categories.php and you will see that the price disappeared.

    My best guess is that the zen_get_products_display_price function in functions_prices.php first checks the following

    Code:
    switch (true) {
            case (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == ''):
            // customer must be logged in to browse
            return '';
            break;
            case (CUSTOMERS_APPROVAL == '2' and $_SESSION['customer_id'] == ''):
            // customer may browse but no prices
            return '';
            break;
            default:
            // proceed normally
            break;
          }
    If the function is called from the admin part, then this check should be skipped.

    Hope this helps,

    sanji

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: No price in product listing

    I have no idea what software you are running but as it lists both OSC and Zen Cart I would assume that this is some custom installation and not Zen Cart v1.3.8a ...
    http://www.zen-cart.com/forum/showthread.php?t=81696

    It is difficult to diagnose something that is not Zen Cart ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: No price in product listing

    sanji, I was able to duplicate your results with 1.3.8a and confirm the bug.

    Customer Shop Status - View Shop and Prices 1 or 2
    Categories / Products - Top : Price/Special/Sale show no prices


    Customer Shop Status - View Shop and Prices 0 or 3
    Categories / Products - Top : Price/Special/Sale shows prices


    Didn't try with your second setting though as the first setting seems to be the cause of the problem.
    Last edited by Website Rob; 26 Dec 2007 at 11:54 PM.

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: No price in product listing

    The setting of 1 and 1 on:
    Customer Shop Status - View Shop and Prices 1
    Customer Approval Status - Authorization Pending 1
    When not logged in (first visit to the site) you are presented with a Login/Create Account ...

    Once account is created or you login and are NOT yet Approved you are presented with the Customer Authorization Pending ...

    Once Approved ... you are presented with a NORMAL shop ...

    This is how this is intended to work for these 2 settings when both are set to 1 ...

    NOTE: If testing and changing settings and approvals you MUST open a new browser window to ensure a NEW session as the settings as a NEW customer are set on a per session basis ... once set you either need to ensure a NEW session to test a change or WAIT for the existing session to expire ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #7
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: No price in product listing

    Linda, the problem/bug is on the Admin side.

    Admin > Categories > Categories / Products - Top : Price/Special/Sale show no prices

    As one is already logged into the Admin, why would settings for Customers affect what the Admin sees in the Admin section?

  8. #8
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: No price in product listing

    Well there is a problem with that ...

    Let me work out the details to fix this ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  9. #9
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: No price in product listing

    This was originally designed to make the Admin mirror the Catalog ... unfortunately, *somebody* ... er ... umm ... me ... forgot to finish this section of code so there was an additional switch in place of the customer_id session variable ...

    This can be changed with a quick fix of:
    PHP Code:
      function zen_get_products_display_price($products_id) {
        global 
    $db$currencies;

        if (
    false) {
    // 0 = normal shopping
    // 1 = Login to shop
    // 2 = Can browse but no prices
        // verify display of prices
          
    switch (true) {
            case (
    CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == ''):
            
    // customer must be logged in to browse
            
    return '';
            break;
            case (
    CUSTOMERS_APPROVAL == '2' and $_SESSION['customer_id'] == ''):
            
    // customer may browse but no prices
            
    return '';
            break;
            default:
            
    // proceed normally
            
    break;
          }
        }

    // show case only
        
    if (STORE_STATUS != '0') {
          if (
    STORE_STATUS == '1') {
            return 
    '';
          }
        } 
    NOTE: the STORE_STATUS is also there to do the same thing, that if you turn off the prices based on STORE_STATUS then the prices would turn off in the Admin as well ...

    Both of these will be fixed in v1.4 with a better arrangement of code ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  10. #10
    Join Date
    Jan 2005
    Posts
    153
    Plugin Contributions
    0

    Default Re: No price in product listing

    Thanks Website Rob for confirming that issue.

    Indeed, the problem is that the same function is used in the public AND the admin side, and that function starts with a test that obviously is NOT relevant if using this function from the admin side...

    sanji

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Display Product Attribute Price on Product LISTING Page
    By y0ul053 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 23 Aug 2013, 07:46 PM
  2. product listing: Huge gap between product and price/add
    By Nkin in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 27 May 2011, 03:00 PM
  3. Replace product-listing price with "Click for Price" button
    By jpmagee in forum General Questions
    Replies: 0
    Last Post: 29 Mar 2010, 01:11 PM
  4. Price Listing on Product Listing page
    By rkmoore11 in forum General Questions
    Replies: 3
    Last Post: 7 Dec 2007, 04:14 PM
  5. Product Price Listing
    By GregoryS in forum General Questions
    Replies: 1
    Last Post: 11 Jul 2007, 04:29 PM

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