Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    Aug 2007
    Location
    South of France
    Posts
    46
    Plugin Contributions
    0

    Default SHOW Specials Start and Expirey dates

    Hello,

    Currently have 30 products on Special promotion for xmas.
    Want customers to know when the promotion expires as they are not exactly running to buy them thinking that the promotion is going to last forever.
    No indication for customer when product promotion starts/ends .

    Imagine the sales at your mega wallmart superstore where they post
    .SALE 50% off everything and don't precise until when ?

    I am sure that this would upset more than one customer who arrived too late
    shouting at the poor cahsier "WELL WHY DIDN'T YOU TELL ME !!!??!!@#"

    I have tried to find a solution in the forum as this is a must for any serious shopkeeper.

    http://www.zen-cart.com/forum/showthread.php?t=44892
    http://www.zen-cart.com/forum/showthread.php?t=40998
    http://www.zen-cart.com/forum/showthread.php?t=46547
    http://www.zen-cart.com/forum/showthread.php?t=44892
    http://www.zen-cart.com/forum/showthread.php?t=65767
    http://www.zen-cart.com/forum/showthread.php?t=1135

    Has anyone actually found a working solution for non developers to be able to implement this ?

    Which mudule(s) exactly should be updated and with what exact code ?

    I get the feeling here that we are touching a subject that has more to it than meets the eye .... ?

    Anyone's help would be appreciated...

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

    Default Re: SHOW Specials Start and Expirey dates

    Make a file in the functions extra directory:
    /includes/functions/extra_functions/myfunctions.php

    Add to it:
    PHP Code:
    <?php
    // extra functions

      
    function zen_get_specials_start($product_id) {
        global 
    $db;
        
    $sql "SELECT specials_date_available from " TABLE_SPECIALS "
                WHERE products_id = '" 
    . (int)$product_id "'";

        
    $check_specials_start $db->Execute($sql);
        return 
    $check_specials_start->fields['specials_date_available'];
      }

      function 
    zen_get_specials_end($product_id) {
        global 
    $db;
        
    $sql "SELECT expires_date from " TABLE_SPECIALS "
                WHERE products_id = '" 
    . (int)$product_id "'";

        
    $check_specials_start $db->Execute($sql);
        return 
    $check_specials_start->fields['expires_date'];
      }
    ?>
    Now you can get the special start and end dates ...

    Something like this in the product _info template:
    PHP Code:
    <?php echo 'Special for Product: ' $_GET['products_id'] . ' is ' zen_date_short(zen_get_specials_start($_GET['products_id'])) . ' - ' zen_date_short(zen_get_specials_end($_GET['products_id'])); ?>
    Would give you for products_id 42:
    Special for Product: 42 is 11/07/2007 - 11/14/2007
    Now just figure out how to utilize it for your code where you really want it ...
    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
    Aug 2007
    Location
    South of France
    Posts
    46
    Plugin Contributions
    0

    Default Re: SHOW Specials Start and Expirey dates

    I will try to put your recomendations in place this weekend.

    As we are getting closer to xmas, the specials are really an essential selling tool I cannot do without and I want to play arround with having different promotions ovelapping to keep the clients interested.

    Sincere Thanks !

  4. #4
    Join Date
    Dec 2007
    Posts
    32
    Plugin Contributions
    0

    Default Re: SHOW Specials Start and Expirey dates

    To bump an old thread:

    I've just implemented this code myself to show the end date of an offer. However, the 'Offer Ends' text I have used in place of 'Specials For Product..' is visible on ALL products, not just those with special prices!

    See an example here:

    http://www.fastcardirect.co.uk/cart/...roducts_id=959
    Has a special price, works fine and looks good.

    http://www.fastcardirect.co.uk/cart/...roducts_id=926
    Has 'Offer Ends:' but since there IS no offer, displays nothing else.

    I'd assume it were a simple 'if' function. Example, if product has special; display 'Offer Ends: [End Date]', else Do Not Display.

    However, I don't have the proper coding abilities to set this out in acceptable PHP.

    Any help?

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

    Default Re: SHOW Specials Start and Expirey dates

    If the date is: 0001-01-01

    then there isn't a start date or end date as the case may be ...
    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!

  6. #6
    Join Date
    Dec 2007
    Posts
    32
    Plugin Contributions
    0

    Default Re: SHOW Specials Start and Expirey dates

    Quote Originally Posted by Ajeh View Post
    If the date is: 0001-01-01

    then there isn't a start date or end date as the case may be ...
    I realise this. It works fine (date-wise) but I would only like the text to display when a special price is applied, not to every product. If you browse the store you see that even products without specials have the 'Offer Ends' text there. I assume it's a case of surrounded the entire statement with a conditional 'if' but I wouldn't know where to start.

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

    Default Re: SHOW Specials Start and Expirey dates

    The text needs to be written for display within an IF so that IF the date isn't to show, then nothing is displayed ...
    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!

  8. #8
    Join Date
    Feb 2007
    Posts
    327
    Plugin Contributions
    0

    Default Re: SHOW Specials Start and Expirey dates

    I know this code for a special and it can be changed to display the end of sales, but would it show the end of sales for items in category A if i created a new sale for catagory A.

  9. #9
    Join Date
    Dec 2007
    Posts
    32
    Plugin Contributions
    0

    Default Re: SHOW Specials Start and Expirey dates

    Quote Originally Posted by Ajeh View Post
    The text needs to be written for display within an IF so that IF the date isn't to show, then nothing is displayed ...
    Don't suppose you'd know the IF statement I'd need?

  10. #10
    Join Date
    Mar 2004
    Posts
    883
    Plugin Contributions
    1

    Default Re: SHOW Specials Start and Expirey dates

    Quote Originally Posted by Ajeh
    Now you can get the special start and end dates ...

    Would give you for products_id 42:
    Special for Product: 42 is 11/07/2007 - 11/14/2007
    Now just figure out how to utilize it for your code where you really want it ...
    Linda,
    Your ECHO is technically correct; however the special actually runs from 11/07/2007 - 11/13/2007.
    The special is not available on the 'expires_date'.

    How would you incorporate SUBDATE('expires_date', INTERVAL 1 DAY) into your proposed 'zen_get_specials_end' function?

    Thank you,
    Juxi

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v139h Banner Manager's Start and Stop Dates Not Showing
    By CSPEN in forum General Questions
    Replies: 20
    Last Post: 3 May 2012, 04:11 AM
  2. Can't set featured product start and end dates
    By discoveroo in forum General Questions
    Replies: 2
    Last Post: 26 Nov 2009, 01:46 PM
  3. Specials Available and Expiry Dates
    By janice3169 in forum Setting Up Specials and SaleMaker
    Replies: 1
    Last Post: 5 Sep 2009, 05:46 AM
  4. Product start and end dates
    By Xanfar in forum Customization from the Admin
    Replies: 5
    Last Post: 15 May 2007, 08:18 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