| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Notify me when the product's information, price and stock level is changed | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Notify me when the product's information, price and stock level is changed
Notify me when the product's information, price and stock level is changed
You can see this in action at http://www.theshisha.com/shopcart/product.php?productid=16139&cat=0&page=1 This modification is for x-cart 4.1.3 version I have posted this modification so that x-cart forum members can contribute to the code and hopefully make any improvements to the modification and post them in this thread. Now about the modification: CUSTOMER: 1. When customer is on "Product Details" page, s/he will see a new form: ------ Notify my when the product's information is changed: < "Enter the email here..." text field > <"Submit" button> ------ The form will look similar for both logged and not logged customer. The only exception will be that the email from the user' profile will be pre-filled in the text-field, however, can be changed to another address, if needed. 2. After clicking "Submit", the script will create a special record in the database, containing the productID, current description, price, quantity in stock and specified email address (a new table will be created for this purpose). ADMIN: When changing the product details (submitting "Product Modify" form, or using "Products import" facility), the script will look if there are any email addresses, associated with the current productID. If yes, it will look for the differences in one of the following fields: - Short/Long description; - Price; - Quantity in stock (from 0 to a bigger value). I.e., it will compare the date, was stored when customer submitted a new form and the currently submitted by the admin data. If any of described changes have taken place, a special "Product information has changed" email will be sent to all the email addresses, associated with current product. The email will contain the text, saying that the information about the product has changed (language variable, which the admin can change in "Languages" section) and the link to "Product Details" page. updated product's information. Also, the information, saved about the product initially (in new table) will be updated with the new product's information (will allow to catch the next changes for the product). Also with the email your customer receives, you have the option to unsubscribe to the product notify me. This modification requires five original xcart 4.1.3 files to be changed: init.php product.php include/import_products.php include/product_modify.php skin1/customer/main/product.tpl Four new x-cart files changed_product_notify.php skin1/mail/productinfo_has_changed.tpl skin1/mail/productinfo_has_changed_subj.tpl skin1/mail/html/productinfo_has_changed.tpl And a change to the SQL file which is below. Apply the SQL changes (Open the Patch/Upgrade page in admin area and select the patch.sql from the archive for the "Apply SQL patch" section). Code:
Upload the Four new x-cart files changed_product_notify.php - This new file goes in the root of your x-cart, same area as where the home.php file is. Code:
skin1/mail/productinfo_has_changed.tpl Code:
skin1/mail/productinfo_has_changed_subj.tpl Code:
skin1/mail/html/productinfo_has_changed.tpl Code:
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24 PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART Shop carts at http://www.nightscene.co.uk/shop/home.php http://www.theshisha.net/shopcart/home.php http://www.system-maintenance.com/maint/home.php http://www.tabac4u.com |
|||||||||
|
#2
|
|||||||||
|
|||||||||
Re: Notify me when the product's information, price and stock level is changed
Now to the five original xcart 4.1.3 files to be changed:
include/import_products.php Look for this code: Code:
replace it with: Code:
Then look for this code in the same file include/import_products.php : Code:
And replace it with: Code:
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24 PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART Shop carts at http://www.nightscene.co.uk/shop/home.php http://www.theshisha.net/shopcart/home.php http://www.system-maintenance.com/maint/home.php http://www.tabac4u.com |
|||||||||
|
#3
|
|||||||||
|
|||||||||
Re: Notify me when the product's information, price and stock level is changed
include/product_modify.php
Find this code: Code:
and replace it with: Code:
In the same file include/product_modify.php look for: Code:
and replace it with: Code:
In the same file include/product_modify.php look for: Code:
and replace it with: Code:
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24 PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART Shop carts at http://www.nightscene.co.uk/shop/home.php http://www.theshisha.net/shopcart/home.php http://www.system-maintenance.com/maint/home.php http://www.tabac4u.com |
|||||||||
|
#4
|
|||||||||
|
|||||||||
Re: Notify me when the product's information, price and stock level is changed
You need to change the init.php file
Look for this code: Code:
and replace it with: Code:
Now open up your product.php and look for: Code:
and replace it with: Code:
OK, last file now, you need to edit skin1/customer/main/product.tpl and place this code in the file. Code:
I would recommend you place this just under your product description, i placed it after the below code: Code:
Thats it the full modification for x-cart 4.1.3, enjoy.
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24 PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART Shop carts at http://www.nightscene.co.uk/shop/home.php http://www.theshisha.net/shopcart/home.php http://www.system-maintenance.com/maint/home.php http://www.tabac4u.com |
|||||||||
|
#5
|
|||||||
|
|||||||
Re: Notify me when the product's information, price and stock level is changed
Hi Shisha,
Do you think that this mod can work on a 4.0.18 version ? I saw that the original mod by Mallromania. And one day, it seemed to me that I saw it on your old site (4.0.1. Thanks in advance Erick
__________________
X-Cart 4.0.18 Telafirma Mod - Bcse Mods Ruby Mod - Firetank Mods |
|||||||
#6
|
|||||||
|
|||||||
Re: Notify me when the product's information, price and stock level is changed
Just cart get this working for some reason any ideas ?
CREATE TABLE x cart_email_for_changed_products Comes up with some errors
__________________
Greg X-CART Gold 4.1.10 |
|||||||
#7
|
|||||||||
|
|||||||||
Re: Notify me when the product's information, price and stock level is changed
What errors ?
Here is the code in my daily CRON mysql backup: Code:
Just add this into your mysql patch in admin area: Code:
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24 PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART Shop carts at http://www.nightscene.co.uk/shop/home.php http://www.theshisha.net/shopcart/home.php http://www.system-maintenance.com/maint/home.php http://www.tabac4u.com |
|||||||||
#8
|
|||||||||
|
|||||||||
Re: Notify me when the product's information, price and stock level is changed
Quote:
No this is for 4.1.3, i really don't think it will work on 4.0.18 and i have not tried it on this version either, and i would imagine you will have to make some code changes for 4.0.18. This mod has nothing to do with Mallromania ( 4.0.18 Price change thread - http://forum.x-cart.com/showthread.php?t=22781 ), if anything it was born via the Funkydunks code (Notify Me - http://forum.x-cart.com/showthread.php?t=2471&page=5&highlight=notify ) which i adapted for 4.0.?? and then changed it for xcart 4.1.? to also include description and price changes as well as zero stock change.
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24 PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART Shop carts at http://www.nightscene.co.uk/shop/home.php http://www.theshisha.net/shopcart/home.php http://www.system-maintenance.com/maint/home.php http://www.tabac4u.com |
|||||||||
#9
|
|||||||
|
|||||||
Re: Notify me when the product's information, price and stock level is changed
Thank you very much for this nice mod
I installed it in my shop and everything went OK, but there is one big problem When a customer types their email in the box and clicks "submit" they get this error message Access denied ! You are not allowed to access that resource! Error ID: 33 any idea what is wrong? thank you in advance for your help
__________________
Paryaei Xcart pro version: 4.1.12 & All the X-cart add ons & Heavily moded |
|||||||
#10
|
|||||||||
|
|||||||||
Re: Notify me when the product's information, price and stock level is changed
Hi All;
i use X-cart PRO 4.1.6. & i'm a newbie Is there no easyer way?? just that costumers can send a mail when its out of stock ?? like this <Out of stock> notify me when it's back in stock Thx in advance
__________________
Core version: 5.3.4.4 PHP: 5.6 Web server: Apache ---stll running a--- x-cart PRO 4.1.6 [unix] updated to 4.1.9 Belgium |
|||||||||
|
|||
X-Cart forums © 2001-2020
|