What I've started working on is basically this:
I plan to write a script that will be called by cron at midnight every night that will take any product that has expired and change their status. In my case, my customer wants to keep all product in his store, even if it has expired, kind of as a portfolio of past products (most of his stuff is one time runs, consigned by customers, etc.) So for him, I've changed the language for "Call for price" to "Archived" which allows the product to stay visible in the cart, but prevent it from being purchased. The cron job will then run a MySQL query to change the value of "Call for Price" from off to on.
I'm still working on the idea of the token. The idea is to allow my customer to be able to send an email link to his customers so that all they need to do is click the link and gain access. If someone were to navigate to the product without the URL, it will prompt them for the token number, very similar to prompting for a password, before allowing the product to be viewed.
Upon submitting the new product (or editing an existing one) I'm thinking a simple Unix Timestamp should be adequate to use as a token. I can't foresee any issues with randomization picking an existing token that way. Something as simple as
Code:
SELECT UNIX_TIMESTAMP(NOW());
It would result in a token that when appended to the URL, should look like such:
Code:
http://testserv.local/zc/index.php?main_page=product_info&cPath=1_9&products_id=26&token=1290490762
Sadly, because of my day job and family life, I've not gotten much farther than figuring what files I needed to edit to add the fields in the screenshot above. Sometimes, it just helps me to write things out even if no one else may read it.
Bookmarks