Results 1 to 9 of 9

Hybrid View

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

    Default Re: Call for Price if Price is set to Zero

    What version of Zen Cart are you using?

    I am looking in v1.3.0.2 ... and have products_price set to nothing ...

    And mark the Product is Call for Price: YES

    And I see no price displayed just the Call for Price tag ...

    NOTE: I also edited the Product which puts the 0.00 into the products_price field and it is still displaying properly ...

    Do you have an URL where this is not working right?
    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!

  2. #2
    Join Date
    Jun 2006
    Location
    Central Massachusetts
    Posts
    62
    Plugin Contributions
    0

    Default Re: Call for Price if Price is set to Zero

    I am using v1.3.02

    Yes everything works just as you explained and i understand that that is the way it is designed to display.

    If price is nothing - No Display

    If price is 0.00 - No Display

    If price is .01 or higher - Display Price

    I want to change the way it works now.

    What i am looking for is the following:

    1. if price is nothing - No Display

    2. if price is set to 0.00 - diplay "Call for Price" image (wihtout having to check the "Product is Call For Price")

    3. if price is 0.01 of more the display the price.

    By doing it this way then i do not have to go into each one of the 3600 plus products (eventually over 15,000) and change the "Product is Call for Price" each and every time I have to change the price to zero. It would be an absolute nightmare to change all of these "Product is Call For Price" if it can not be done automatically on the price block.

    It takes us long enough now when we have a price change to update a text file for uploading. Imagine how long it would take to update each individual item for "Price is Call For Price" after updateing the pirces.

    Any ideas on how to make this happen would be greatly appriciated.

    Thnaks in advance.

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

    Default Re: Call for Price if Price is set to Zero

    There is a fine distinction between nothing and 0.00

    If a products_price is nothing ... and you edit ... it will become 0.00

    There are other circumstances when this can happen as well ...

    You can try to alter the display via the fuction but I do not think at that point you will be able to tell the difference between nothing and 0.00

    Do you have any other identifier to distinguish between nothing and 0.00 on products_price?

    Is this something where before adding the products to the database you could set anything that has products_price blank to a negative number that could be captured in the function to send back a blank?

    Could the qualifier be blank or 0.00 price and not price_is_call = 1 to determin this should be a blank 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!

  4. #4
    Join Date
    Jun 2006
    Location
    Central Massachusetts
    Posts
    62
    Plugin Contributions
    0

    Default Re: Call for Price if Price is set to Zero

    I supose that when we do our pricing adjustments (every couple of days) that we could use a negative number (-0.10) to indicate that we need the "Call for Price" image to show up.

    That would then mean that Zen Cart would need to show ONLY positive Prices, whick it dones not do now.

    If statements could be writen to cause these adjustments to happen.

    i.e.

    If "prduct_price" = -0.10 then

    price_is_call = 1
    product_price_display = 0

    else

    price_is_call = 0
    product_price_display = 1

    Obvioulsy the correct or best variable would need to be used. But where to even start thinking about purtting these staments is where i am having a problem. I do not know enough about the linking structure yet within the pages to get started.

    Any suggestions on where to start attempting such a mod would be helpfull.

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

    Default Re: Call for Price if Price is set to Zero

    One place would address all the display prices ...

    Peek in the /includes/functions/functions_prices.php

    The function zen_get_products_display_price manages the display ...

    At the bottom, is where the Call for Price is handled ...

    PHP Code:
        // If Call for Price, Show it
        
    if ($product_check->fields['product_is_call']) {
          if (
    PRODUCTS_PRICE_IS_CALL_IMAGE_ON=='0') {
            
    $call_tag '<br />' PRODUCTS_PRICE_IS_CALL_FOR_PRICE_TEXT;
          } else {
            
    $call_tag '<br />' zen_image(DIR_WS_TEMPLATE_IMAGES OTHER_IMAGE_CALL_FOR_PRICEPRODUCTS_PRICE_IS_CALL_FOR_PRICE_TEXT);
          }
        } 
    The final display price is whatever the results are when you hit:
    PHP Code:
        return $final_display_price $free_tag $call_tag
    You can alter this return based on any condition you want either at the end of the function or build an IF to catch it right near the start after the information has been gathered in:
    PHP Code:
        $product_check $db->Execute("select products_tax_class_id, products_price, products_priced_by_attribute, product_is_free, product_is_call from " TABLE_PRODUCTS " where products_id = '" $products_id "'" " limit 1"); 
    Note: the add to cart buttons work in a similar manner ...

    The function zen_get_buy_now_button

    Decides if the button has to be changed ... it follows along the same logic as the price display so to speak ...

    Just catch the data with an IF before the return happens to test for your new condition ...

    NOTE: there are no overrides on the functions so you will need to keep a copy of the original files and your changed files ...
    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. v154 call for price showing with price £0.00 - no price set
    By peanut77 in forum Setting Up Categories, Products, Attributes
    Replies: 8
    Last Post: 25 Jan 2016, 09:42 PM
  2. How to set Call for Price
    By perica6892 in forum General Questions
    Replies: 0
    Last Post: 20 Apr 2009, 04:13 PM
  3. Disable Call for price url below Call for price image?
    By IllusionGuy in forum General Questions
    Replies: 0
    Last Post: 6 Jan 2009, 10:36 PM
  4. Call for Price, how do I set it up?
    By TheMusician in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 28 Jun 2007, 05:19 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