Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.

Lowest price of attributes - how?

Locked

Started by skylarker on 9 Aug 2006, 5:32 PM · Views: 1,614

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
9 Aug 2006, 5:32 PM
#1
skylarker avatar

skylarker

New Zenner

Join Date:
Aug 2005
Posts:
45
Plugin Contributions:
0

Post #1 by skylarker

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!

9 Aug 2006, 5:50 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #2 by ajeh

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

Look in the /includes/functions/functions_prices.php

// 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!

9 Aug 2006, 6:34 PM
#3
skylarker avatar

skylarker

New Zenner

Join Date:
Aug 2005
Posts:
45
Plugin Contributions:
0

Post #3 by skylarker

Ajeh:

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

Look in the /includes/functions/functions_prices.php

// 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.