Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Notify me when the product's information, price and stock level is changed

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 08-25-2007, 08:03 AM
 
alinush alinush is offline
 

Advanced Member
  
Join Date: Jul 2007
Posts: 88
 

Default Re: Notify me when the product's information, price and stock level is changed

Thank you ShishaPipeUK for posting this wonderful mod.

In case anybody else is interested in this, I got it installed on 4.1.8. There were a few problems:

1. I had to manually insert some of the records in the database (I don't know why it didn't work from the Patch section in X-Cart).

2. in product_modify.php, I had to replace:

Code:
x_load('backoffice','category','image','product');

with:

Code:
x_load('backoffice','category','image','product','mail');

3. Maybe this was related to my custom theme, but I had to remove:

Code:
<input type="hidden" name="desc" value="{$product.descr}"> <input type="hidden" name="fulldesc" value="{$product.fulldescr}">

from product.tpl, as the description was displaying 2 times on the product page.

That's it Thanks again.
__________________
X-Cart 4.1.x to 4.7.x
Reply With Quote
  #12  
Old 01-02-2008, 07:55 PM
  ShishaPipeUK's Avatar 
ShishaPipeUK ShishaPipeUK is offline
 

Senior Member
  
Join Date: Jul 2005
Location: London, England.
Posts: 118
 

Thumbs up Re: Notify me when the product's information, price and stock level is changed

Works OK on 4.1.9 as well, just some minor changes in the standard code but you can easy follow the instructions and find where to place the code.

You can see an example at http://www.shishapipe.net/shopcart/product.php?productid=16594&cat=296&page=1

This site uses menu tabs so I did not edit the skin1/customer/main/product.tpl code, but instead entered this into the tab code for my site.

I followed my own instructions for 4.1.3 and found there where no code changes for 4.1.9 but just a few changes in the look for code, but you can easy find the area the code needs to be placed without problems.
__________________
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
Reply With Quote
  #13  
Old 01-12-2008, 12:22 PM
 
inmotionmedia inmotionmedia is offline
 

Newbie
  
Join Date: Jun 2007
Posts: 8
 

Default Re: Notify me when the product's information, price and stock level is changed

This mod sounds great! does the site owner also recieve a notification of which product is "requested"?
__________________
In Motion Media
Reply With Quote
  #14  
Old 01-12-2008, 04:22 PM
  ShishaPipeUK's Avatar 
ShishaPipeUK ShishaPipeUK is offline
 

Senior Member
  
Join Date: Jul 2005
Location: London, England.
Posts: 118
 

Default Re: Notify me when the product's information, price and stock level is changed

No that's not been implemented as when you add the stock back in it automatically emails the people who requested the stock notify, but does not email the admin, sorry.

Also the admin does not know who has requested the stock notify unless you look in the mysql data (xcart_email_for_changed_products), i did not make a back end admin section to look at what emails have requested the change in the product stock or details or price.

The table in the mysql you need to look for that stores the email and product details is:

Code:
CREATE TABLE xcart_email_for_changed_products ( productid int(11) NOT NULL default '0' , email varchar(128) NOT NULL default '' , descr text NOT NULL default '' , fulldescr text NOT NULL default '' , price decimal(12,2) NOT NULL default '0.00' , avail int(11) NOT NULL default '0' , PRIMARY KEY (productid,email) ) TYPE=MyISAM;

Here is an example of one of the entrys:
HTML Code:
INSERT INTO xcart_email_for_changed_products VALUES (16296, 'someones_email@I have deleted.com', '<b>Syrian shisha pipe</b>, elegant in style, fully working shisha pipe.<br><br> Please allow 7 days for delivery on this product.', '<b>Syrian shisha pipe</b>, elegant in style, fully working shisha pipe.<br><br> Please allow 7 days for delivery on this product.', '120.00', 0);

And when you edit the product in admin, either the descr (Description), fulldescr (Full Description), price (The Price) or avail (Stock level from 0 to a greater number) a email will be sent out automatically.

It would not be hard to make a back end admin section to view the emails and products that have been requested for by email address (Look at the wish list code - php and tpl), but i just don't have the time to do this yet, sorry.
__________________
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
Reply With Quote
  #15  
Old 05-16-2008, 05:15 AM
 
TanyaG TanyaG is offline
 

Advanced Member
  
Join Date: Nov 2007
Posts: 94
 

Default Re: Notify me when the product's information, price and stock level is changed

Not sure what I’m doing wrong but when I’m trying to unsubscribe getting an error message
Notice: Undefined variable: mode in /var/www/vhosts/httpdocs/changed_product_notify.php on line 2
Notice: Undefined variable: mode in /var/www/vhosts/httpdocs/changed_product_notify.php on line 8
Notice: Undefined variable: login in /var/www/vhosts/httpdocs/changed_product_notify.php on line 16

Is anybody know how to fix it.
Many thanks
__________________
Tanya

x-cart version: 4.1.7 4.1.9. 4.2
Reply With Quote
  #16  
Old 05-18-2008, 11:26 AM
 
MBA MBA is offline
 

eXpert
  
Join Date: Apr 2006
Posts: 245
 

Default Re: Notify me when the product's information, price and stock level is changed

Works on 4.1.10. I had to manually put in the dif. patching wouldn't work for some unknown reason. We've had this issue with other mods in 4.1.10 too so it may be a bug/change/error with the 4.1.10 patching system?

Either way, nice mod.
__________________
xCart Pro Version 4.0.17, 4.0.19, 4.1.8, 4.1.10, 4.1.11, 4.1.12 - retired
xCart Pro Version 4.3.1 - production
xCart Pro Version 4.5.1 - testing
RHEL Platform
Reply With Quote
  #17  
Old 12-09-2008, 01:03 AM
 
TanyaG TanyaG is offline
 

Advanced Member
  
Join Date: Nov 2007
Posts: 94
 

Default Re: Notify me when the product's information, price and stock level is changed

Thanks a lot for a great mod. Is anybody know how I can add a Confirmation Page (something like: “Thank you for submitting your email....”) and if email address is empty or doesn’t contained @ or . – page saying “Please get back and correct it...”.

Many thanks
__________________
Tanya

x-cart version: 4.1.7 4.1.9. 4.2
Reply With Quote
  #18  
Old 01-06-2009, 03:45 PM
 
donavichi donavichi is offline
 

X-Adept
  
Join Date: Apr 2004
Location: United Kingdom
Posts: 697
 

Default Re: Notify me when the product's information, price and stock level is changed

ShishaPipeUK,

This would be useful for a site i'm working on, but i have a question about it.

Because I have a high volume of products to alter when i do an update, too many for x-cart product imports, I insert product details directly into the mySQL database in bulk instead.

Would the mod work in this instance or will it only work if an x-cart induced product import is done?

Thanks in advance,
__________________
Best regards,

Donavichi.
- - -

Website Copywriting || Web Design || FAQs || Home & Garden Blog
Reply With Quote
  #19  
Old 01-08-2011, 12:53 PM
  ADDISON's Avatar 
ADDISON ADDISON is offline
 

X-Man
  
Join Date: Jan 2008
Posts: 2,613
 

Default Re: Notify me when the product's information, price and stock level is changed

This is a great mod. Thanks for sharing.

I consider useful as a visitor only the following notifications:

- if the price decreases
- back in stock (initial stock 0 - out of stock, if it is changed to positive values - in stock)
__________________
X-Cart Next: Business 5.2 (learning and testing)
X-Cart Classic: Gold and Gold Plus 4.7
Lots of Modules and Customizations
OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux
Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions)

You can catch my ideas here: http://ideas.x-cart.com
Reply With Quote
  #20  
Old 03-26-2011, 07:32 AM
  ADDISON's Avatar 
ADDISON ADDISON is offline
 

X-Man
  
Join Date: Jan 2008
Posts: 2,613
 

Default Re: Notify me when the product's information, price and stock level is changed

I would like to ask if this mods allows to unsubscribe. Let's say I am an anonymous visitor and I would like to be informed about price decrease using this feature.
__________________
X-Cart Next: Business 5.2 (learning and testing)
X-Cart Classic: Gold and Gold Plus 4.7
Lots of Modules and Customizations
OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux
Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions)

You can catch my ideas here: http://ideas.x-cart.com
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:13 PM.

   

 
X-Cart forums © 2001-2020