Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2005
    Posts
    49
    Plugin Contributions
    0

    Lowest price of attributes - how?

    When a product is priced by attributes, I know that the ZC system is set up to display the lowest possible combination of attribute prices. I've been trying to figure out how it does that - can someone provide a short but sweet description of how the code fetches the lowest attribute prices? Thanks!

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

    Default Re: Lowest price of attributes - how?

    If I told you ... I'd have to kill you ...

    Look in the /includes/functions/functions_prices.php

    PHP Code:
    // computes products_price + option groups lowest attributes price of each group when on
      
    function zen_get_products_base_price($products_id) { 
    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
    Aug 2005
    Posts
    49
    Plugin Contributions
    0

    Default Re: Lowest price of attributes - how?

    Quote Originally Posted by Ajeh
    If I told you ... I'd have to kill you ...

    Look in the /includes/functions/functions_prices.php

    PHP Code:
    // computes products_price + option groups lowest attributes price of each group when on
      
    function zen_get_products_base_price($products_id) { 
    Actually I think I have it...zen_get_products_base_price() does a query that orders by options_values_price, and takes the first value of that field for every unique options_id value.

 

 

Similar Threads

  1. Attributes not showing lowest price after upgrade to 1.3.9d
    By tat2nu in forum Setting Up Categories, Products, Attributes
    Replies: 7
    Last Post: 31 May 2011, 07:31 AM
  2. Attributes Lowest Price Not Displaying
    By turbo2001rt in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 15 Jan 2011, 10:01 PM
  3. Need to show product price as ONE OF the attributes price, but not lowest??
    By infocom in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 19 Nov 2009, 06:15 PM
  4. Price by Attributes not default to lowest price?
    By srt9969 in forum Setting Up Categories, Products, Attributes
    Replies: 9
    Last Post: 27 Jan 2009, 10:23 AM
  5. Display price will include lowest group attributes prices plus price
    By jtjohnston in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 3 Feb 2008, 06:39 AM

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