ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Those last two would be my suggestion though I would start with product, because document_general is working as expected... The other thing, do you have any plugins installed that possibly modify the number of fields in the products table or display "extra" fields on the data input screen?
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Thank you for pointing me in the right direction ... with your advice and trusty old Winmerge I found one difference in admin/includes/modules/preview_info.php
Instead of:
if ($pInfo->products_date_available > date('Y-m-d')) {
it read:
if (true || $pInfo->products_date_available > date('Y-m-d')) {
Now I remember changing this because we didn't want our site to say books will be available on a specific date but we use it as an EXPECTED date (they don't necessarily publish on time).
So I reset it to the vanilla setting and all seemed to work. The other thing we don't want is when a book goes past it's due date that it automatically gets set to available (products_date_available set to NULL). So I changed it back and all seemed OK - no zeroes in the field but the past due date was reset to null.
My conclusion is that I didn't make that (true || ... statement correct in the first instance.
So digging further I find that the field is reset in admin/includes/modules/update_product.php where it states:
$products_date_available = (date('Y-m-d') < $products_date_available) ? $products_date_available : 'null';
so I have replaced this with:
// Stop removing past due by dates
// $products_date_available = (date('Y-m-d') < $products_date_available) ? $products_date_available : 'null';
if ($products_date_available == '') { $products_date_available = 'null'; }
//
That works a treat - no more zeroes in the database and past due dates are retained until we manually remove them!
All I have to do now is find the product info page and stop any past due book from allowing Add To Cart,
Thank you for your patience and assistance to someone to whom certain PHP statements are actually NOT logical!!!!
Quite welcome. Whatcha mean though about having to find the product info page? The "start" of it is the header in includes/modules/pages/product_info then the chase starts with the applicable tpl file. :)
Don't forget tools such as the developer's toolkt, the resulting web page source, etc... :)
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
As always I appreciate all your help. I did load a fresh install that I will leave to play around with and see if I can recode the Expected Products section correctly as I learn more.
I think the problem is that whist we are a little different to other "shops" I still don't believe that any system should have an automatic right to clear expected dates.
For instance, say, a clothes shop might say something will be in stock on a particlar date and once past reverts to saying that it is in stock - but the stock may have been delayed and not arrived and therefore cannot be supplied.
I think these decisions should be under the store owner's control. Maybe that is something that can be looked at in future releases :)
First of all want to say I agree that there should be a way to prevent the auto-trigger of active status in absence of some outside trigger (in the case described above, receipt of material) and it has been requested in one way or another over time... There has also been discussion of turning off a product by date... Not everyone uses both or either, but that's also what plugins are about.
As to the thought of a product's availability versus it being "active" on the site, there's also the concept of pre-orders and well, the need (or lack of) controlling the ability to purchase upon it being in one's hands... Might be worth looking through the numbers to see 1) what is the history of never receiving a product, 2) what is the history of timeliness of delivery by an organization, etc.., 3) what is your product view history like and that over time? There may be ways that the store can increase income, by taking advantage of some of those facts from a business perspective.
The big thing though is that hardly can a product be put together that completely covers every aspect, every site owner straight out of the box, but having enough flexibility to shape it to the individual needs... Priceless..
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
I totally agree with everything you're saying .. I guess we're just trying to do something that could be considered outside of the box .. we'll find a wayto get around the problem and in the meantime we will use the vanilla install to see if we can identify where our testing of dates really should sit :)