If the time where there to be used and the calculations available for the time itself then it would show ...
I have not tried to take this beyond the date on functionality but gave the full syntax for date and time ...
If the time where there to be used and the calculations available for the time itself then it would show ...
I have not tried to take this beyond the date on functionality but gave the full syntax for date and time ...
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!
thanks Ajeh, this works great! ;)
Urgh, sorry to be a nuisance Ajeh, I quoted you on the wrong code earlier, what I wanted was to know how to keep/add the "add to cart" button to the following code:
$button_check = $db->Execute("select product_is_call, products_quantity, products_date_available from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "'");
switch (true) {
// cannot be added to the cart
case (zen_get_products_allow_add_to_cart($product_id) == 'N'):
return $additional_link;
break;
case (date_diff($button_check->fields['products_date_available'], date('Y-m-d H:i:s', time())) < 0 ):
$return_button = 'Coming Soon!!<br />Count Down: ' . date_diff($button_check->fields['products_date_available'], date('Y-m-d H:i:s', time())) . ' Days!';
break;
So instead of it saying "Coming Soon!!" it would instead have the add to cart button in its place.
Thanks again.
The code presented here breaks listing under 1.3.9.
Any changes to the code that will make it work under 1.3.9?
thanks!
Let's pretend that no one has seen this code in a couple three years ...
What code is breaking what and what is the error message that you see in the /cache on the debug log that is generated?
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!
Bookmarks