Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Product Price Check Query

    Hi Peeps,

    I need to implement some code within both

    includes/modules/product_listing.php
    and
    includes/templates/MY_TEMPLATE/templates/product_info_display.php

    which will check the product price and do something if the price is over a certain value.

    so far I have had no luck.

    is there an easy way I can do this???

    Cheers

    Phil

  2. #2
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Product Price Check Query

    anyone?

    do i have to do something clever with the follwoing as they all seem to be treated seperatly? for example I take it there is nothing that will just return the final price?

    PHP Code:
    $show_display_price '';
        
    $display_normal_price zen_get_products_base_price($products_id);
        
    $display_special_price zen_get_products_special_price($products_idtrue);
        
    $display_sale_price zen_get_products_special_price($products_idfalse); 
    please help :O)

  3. #3
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Product Price Check Query

    worked it out myself, probably not the best way but seems to work.

    in product_listing.php i used:

    PHP Code:
    if (zen_get_products_special_price($listing->fields['products_id']) > '10') {
            
    $freedelicon '<img src="freedel.png" style="float:right" width="50" alt="Free Delivery" />';
            } else {
            
    $freedelicon '';
            } 
    and in the product_info_display.php I used:

    PHP Code:
    <?php if (zen_get_products_special_price((int)$_GET['products_id']) > 10) { echo '<img src="freedel.png" width="70" alt="Free Delivery" />'; } ?>
    any enhancements to this would be appreciated

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

    Default Re: Product Price Check Query

    In the products table, the field:
    products_price_sorter

    holds the bottom line lowest price of a Product ...

    Perhaps that could be used?
    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
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Product Price Check Query

    Quote Originally Posted by Ajeh View Post
    In the products table, the field:
    products_price_sorter

    holds the bottom line lowest price of a Product ...

    Perhaps that could be used?
    Wow i think we replied at the exact same time lol

 

 

Similar Threads

  1. v151 query from a category its products name, price, image, description and attributes
    By cmsdeployed in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 19 Jul 2013, 07:21 PM
  2. Problems with query change price in 2 tables
    By Petje007 in forum General Questions
    Replies: 17
    Last Post: 2 Oct 2012, 04:15 PM
  3. 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
  4. Query - Base Price + Attributes (Upgrades)
    By johna8 in forum Setting Up Categories, Products, Attributes
    Replies: 14
    Last Post: 31 Jul 2008, 07:13 PM
  5. How to Query the Price for a Product
    By voltage in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 8 Jul 2006, 04:28 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