Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2005
    Location
    Houston, TX
    Posts
    1,410
    Plugin Contributions
    1

    Default How to Query the Price for a Product

    I have a custom page on which I would like to display the prices for several products. Instead of just hardcoding the prices for these products, I would prefer to extract their prices from the SQL. Is there a simple or fairly simple way of doing this? Any help would be great!
    Thanks

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

    Default Re: How to Query the Price for a Product

    There are a lot of functions in the /includes/functions/functions_prices.php

    Peek at some of the other pages such as the listings, product _info and sideboxes to see how the prices are actually pulled ...

    This should give you quite a variaty of how these functions are used in the various areas so you can determin a Product Price ...
    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
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: How to Query the Price for a Product

    Example, peek in the /includes/modules/sideboxes/featured.php

    Notice how the Product Price is grabbed with the function:
    PHP Code:
    $featured_box_price zen_get_products_display_price($random_featured_product->fields['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!

 

 

Similar Threads

  1. Replies: 17
    Last Post: 19 Feb 2013, 12:45 PM
  2. how to align the product title, price and add to cart box next to the product image?
    By evaky in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 5 Mar 2012, 03:31 AM
  3. Product Price Check Query
    By philip937 in forum General Questions
    Replies: 4
    Last Post: 18 Oct 2011, 03:18 PM
  4. How to swap main product price with the main product price + attribute's price total?
    By apham in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 20 Apr 2011, 06:36 PM
  5. Base price for product plus price by the foot?
    By kafer in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 19 Jan 2007, 12:17 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