Page 4 of 4 FirstFirst ... 234
Results 31 to 37 of 37
  1. #31
    Join Date
    Oct 2011
    Posts
    25
    Plugin Contributions
    0

    Default Re: Sold New Products display Sold Out instead of price on index and products_new pag

    :) ok ... so I did a search for all products and tried to find a relevant place to remove my category for "sold products"
    you sent me this information in response to it

    "Then, to prevent those Products from showing in the All Products ... you would need to customize the SQL statement for the All Products to exclude the categories_id for the Sold Out Products ... "

    Can you please help to which php file that I can change to remove my category. cheers and thanks again presh.

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

    Default Re: Sold New Products display Sold Out instead of price on index and products_new pag

    You would need to customize the file:
    /includes/modules/pages/products_all/header_php.php

    Code:
      $products_all_query_raw = "SELECT p.products_type, p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id,
                                        p.products_date_added, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight, p.product_is_call,
                                        p.product_is_always_free_shipping, p.products_qty_box_status,
                                        p.master_categories_id
                                 FROM " . TABLE_PRODUCTS . " p
                                 LEFT JOIN " . TABLE_MANUFACTURERS . " m ON (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd
                                 WHERE p.products_status = 1
                            AND p.master_categories_id != 70
                                 AND p.products_id = pd.products_id
                                 AND pd.language_id = :languageID " . $order_by;
    again, change the 70 to your categories_id ...

    NOTE: there is no override for this file ...
    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: v1.5.5]
    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. #33
    Join Date
    Oct 2011
    Posts
    25
    Plugin Contributions
    0

    Default Re: Sold New Products display Sold Out instead of price on index and products_new pag

    YES!! :) Thank you so much :) I think my queries are slowly disapearing :) Thank you! I really really could not do it without you guys, Presh.

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

    Default Re: Sold New Products display Sold Out instead of price on index and products_new pag

    You are most welcome ... thanks for the update that this worked for you ...
    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: v1.5.5]
    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. #35
    Join Date
    May 2008
    Posts
    402
    Plugin Contributions
    0

    Default Re: Sold New Products display Sold Out instead of price on index and products_new pag

    Want to say thanks for this thread and let everyone know it still works in 2016 with v1.5.5.

    For anyone who wants more control over what is displayed, you can use this code to add text.
    Code:
    // return sold out vs price
      $products_quantity = zen_get_products_stock($products_id);
      if ($products_quantity <= 0) {
        return 'ADD ANY TEXT HERE';
      }
    To make it only show on the product listing pages and not on the product info pages, had to wrap the text in a span and then add an inline style to tpl_product_info_display.php to hide the span.

    Was wondering if there is a cleaner way to do this without having to use the inline style?

  6. #36
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: Sold New Products display Sold Out instead of price on index and products_new pag

    Quote Originally Posted by pricediscrimination View Post
    Want to say thanks for this thread and let everyone know it still works in 2016 with v1.5.5.

    For anyone who wants more control over what is displayed, you can use this code to add text.
    Code:
    // return sold out vs price
      $products_quantity = zen_get_products_stock($products_id);
      if ($products_quantity <= 0) {
        return 'ADD ANY TEXT HERE';
      }
    To make it only show on the product listing pages and not on the product info pages, had to wrap the text in a span and then add an inline style to tpl_product_info_display.php to hide the span.

    Was wondering if there is a cleaner way to do this without having to use the inline style?
    Probably a cleaner way by using css. See the guidance on css files in includes/templates/template_default/css for file naming to apply the desired css to the "structure" to be modified.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #37
    Join Date
    May 2008
    Posts
    402
    Plugin Contributions
    0

    Default Re: Sold New Products display Sold Out instead of price on index and products_new pag

    Will do, thank you.

    Quote Originally Posted by mc12345678 View Post
    Probably a cleaner way by using css. See the guidance on css files in includes/templates/template_default/css for file naming to apply the desired css to the "structure" to be modified.

 

 
Page 4 of 4 FirstFirst ... 234

Similar Threads

  1. Replies: 2
    Last Post: 7 Jul 2016, 06:34 AM
  2. Gap in product listing between price and 'sold out' button (new thread)
    By Thannaree in forum Templates, Stylesheets, Page Layout
    Replies: 13
    Last Post: 6 Sep 2012, 11:41 AM
  3. Replies: 7
    Last Post: 28 Mar 2011, 04:08 AM
  4. New Products still showing Sold Out and Disabled Items
    By shawnchr in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 1 Nov 2010, 12:57 AM
  5. 'Sold out' button instead of price on main page
    By wendon in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 14 Jan 2010, 10:53 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR