Page 1 of 2 12 LastLast
Results 1 to 10 of 20
  1. #1
    Join Date
    Jan 2007
    Posts
    147
    Plugin Contributions
    0

    Default Change sold out image for upcoming products only?

    Hi there,

    Can someone please tell me how I can change the sold out image that displays for upcoming/new products with 0 quantity yet in stock, without the image affecting legit out of stock items?

    (Iwant to keep the "sold out" image for existing stock that is actually sold out...)

    So, I'd like to create an image that says "coming soon" for the upcoming stuff, and leave "sold out" for existing stuff that is out of stock...

    Hopefully that makes sense?

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Change sold out image for upcoming products only?

    As they both have a "0" stock quantity - How will you differentiate those that are out and those that are coming???
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jan 2007
    Posts
    147
    Plugin Contributions
    0

    Default Re: Change sold out image for upcoming products only?

    Well, I'll know, but I suppose you mean to ask how the system will be able to tell? Good question, then. :)

    Sounds like it can't be done without some scary coding?

    Is there another way around this?

  4. #4
    Join Date
    May 2007
    Location
    Brighton/Hove/Sussex
    Posts
    144
    Plugin Contributions
    0

    Default Re: Change sold out image for upcoming products only?

    The system must know at least some difference with it having a date on forthcoming so if we put 1 (one) in the stock, but as its not yet to hand does it cover the problem if there is a coding patch to ensure the single one in stock cannot be bought until that due date?
    Not actually tried that to be honest, just was looking for the same query, & was my next step, but I would prefer a 'coming soon' logo, plus a page visitors can look at like a duplicate listing we could have them all listed at, but would disapear once the date comes round.
    Does my thoughts on this make sense?
    Original store was 1.39:- TransportPostcards.co.uk/shop (redirecting out)
    Working on a fresh new store... 1.56a TransportPostcards.co.uk/store
    Appreciate Zen-Cart? - Always keep a banner link on your shop

  5. #5
    Join Date
    May 2007
    Location
    Brighton/Hove/Sussex
    Posts
    144
    Plugin Contributions
    0

    Default Re: Change sold out image for upcoming products only?

    Nope, just tried and gives an 'add to basket' sign so misses the point of 'not yet available' must be a work round somehow.

    Even giving a zero costing you can still buy it once you put any stock in it just to avoid a big red 'sold out' sign on something thats not even available yet. Does make a store look odd to the customer.
    Original store was 1.39:- TransportPostcards.co.uk/shop (redirecting out)
    Working on a fresh new store... 1.56a TransportPostcards.co.uk/store
    Appreciate Zen-Cart? - Always keep a banner link on your shop

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

    Default Re: Change sold out image for upcoming products only?

    You could change the functions_general.php and around line 1339 you will see:
    Code:
        switch (true) {
    // cannot be added to the cart
        case (zen_get_products_allow_add_to_cart($product_id) == 'N'):
          return $additional_link;
          break;
    change to read:
    Code:
        switch (true) {
    // cannot be added to the cart
        case (zen_get_products_allow_add_to_cart($product_id) == 'N'):
          return $additional_link;
          break;
    // not available for purchase based on products_date_available      
    case ($button_check->fields['products_date_available'] > date('Y-m-d H:i:s')):
          return 'NOT AVAILABLE YET';
    break;
    You will need to tweak this a bit here and there but this will stop the Add to Cart on products that are Upcoming Products ... everywhere in the shop ...

    Nifty the power of the functions in Zen Cart, eh?
    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!

  7. #7
    Join Date
    May 2007
    Location
    Brighton/Hove/Sussex
    Posts
    144
    Plugin Contributions
    0

    Default Re: Change sold out image for upcoming products only?

    Quote Originally Posted by Ajeh View Post
    You could change the functions_general.php and around line 1339 ...
    Nifty the power of the functions in Zen Cart, eh?
    Great work there, as the previous poster said, down to some nifty code, & over my head to write that sort of thing.
    Will give that a go. Many thanks.

    Doing this, I presume is covered in the custom overides system.
    Looking forward, many of these little adaptions could be not compatable with version 2.0 ?
    1.3.7 is working fine just not the PayPal express bit, so satying put for now.
    Original store was 1.39:- TransportPostcards.co.uk/shop (redirecting out)
    Working on a fresh new store... 1.56a TransportPostcards.co.uk/store
    Appreciate Zen-Cart? - Always keep a banner link on your shop

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

    Default Re: Change sold out image for upcoming products only?

    This is not an override for the function file ... be sure to backup your original as well as the customized one ...

    The advantage of customizing this function is that it affects all of the Add to Cart and Buy Now features ...

    To use the Overrides, you would have to touch a lot of files to make the same change ...
    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!

  9. #9
    Join Date
    May 2007
    Location
    Brighton/Hove/Sussex
    Posts
    144
    Plugin Contributions
    0

    Default Re: Change sold out image for upcoming products only?

    Ah now thats worth keeping in mind, anything I have done has been trying to grasp this override system until this suggested bit of code.
    I have renamed any original file & replaced it with the new version just in case, as one slip of a character has killed the whole site from working misunderstanding the flow of php on one error.
    Without diverting the topic too far, will all our overides & tinkering like this therefore be absolutly dead? Im not 100% confident about making any upgrade, fear of losing all my templates & layouts.

    Will post back for others benefit how the code here works.
    Many thanks
    Original store was 1.39:- TransportPostcards.co.uk/shop (redirecting out)
    Working on a fresh new store... 1.56a TransportPostcards.co.uk/store
    Appreciate Zen-Cart? - Always keep a banner link on your shop

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

    Default Re: Change sold out image for upcoming products only?

    The templates and override files are in your custom directories and should not get touched by an upgrade ... although you may need to update them ...

    NOTE: Always upgrade a test site with a test database before attempting a Live Site ...

    As to customizing code that cannot be overridden, saving your changed file(s) and the original file(s) allows you to compare them and add your changes back in when upgrading ...

    Backups are the secret to success ...
    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!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 2
    Last Post: 7 Jul 2016, 06:34 AM
  2. v151 Hide Normalprice for sold out products & in product listing page ONLY!
    By Green Books in forum General Questions
    Replies: 1
    Last Post: 4 Oct 2015, 06:06 PM
  3. Sold Out Notification only appears for products with Attributes
    By Youngblood in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 25 Jun 2013, 06:17 PM
  4. Change SOLD OUT button to text on new products page only
    By asphole in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 23 Sep 2008, 03:56 PM
  5. Where do I change the alt image tag for the "Sold Out' Button?
    By candylotus in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 9 May 2008, 05:00 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