Re: Back In Stock Notifications
Hi,
Quote:
Originally Posted by
Sudakoma
Great looking mod Conor, as usual, however im having trouble with it.
Thanks... I'm sorry to hear that though - thought I'd got all problems covered now! ;)
Quote:
Originally Posted by
Sudakoma
Ive copied all the files over and ran the sql and it is showing up under 'configuration' and also 'catalogue' in Admin. The only problem is, the option to enable it is not there, so it doesn't work!
It sounds like the entire SQL file wasn't successfully run then. The option to enable the module is inserted by the SQL so if it's not there then the module won't work!
Do you just have a "Configuration Group" for Back In Stock Notifications but no options within that group? Or, if you do have any of the options, what do you have?
If you're missing options then something strange must have happened with the SQL file and it could possibly be run again to see if any errors come up:
Open the SQL file before you run it and uncomment the lines to delete the existing options/group, then run it again.. you shouldn't get any errors. If you do, that would cause the missing options you are talking about!
All the best...
Conor
Re: Back In Stock Notifications
Quote:
Originally Posted by
conor
Hi,
Thanks... I'm sorry to hear that though - thought I'd got all problems covered now! ;)
It sounds like the entire SQL file wasn't successfully run then. The option to enable the module is inserted by the SQL so if it's not there then the module won't work!
Do you just have a "Configuration Group" for Back In Stock Notifications but no options within that group? Or, if you do have any of the options, what do you have?
If you're missing options then something strange must have happened with the SQL file and it could possibly be run again to see if any errors come up:
Open the SQL file before you run it and uncomment the lines to delete the existing options/group, then run it again.. you shouldn't get any errors. If you do, that would cause the missing options you are talking about!
All the best...
Conor
Thanks for the reply. When i open the configuration group for Back In Stock Notifications, there are no options at all, just 3 headings:
Title
Value
Action
I tried running the sql file again after uncommenting the lines to delete the existing options/groups and got the following errors:
14 statements processed.
ERROR: Cannot insert configuration_key "" because it already exists
ERROR: Cannot insert configuration_key "" because it already exists
ERROR: Cannot create table back_in_stock_notification_subscriptions because it already exists
Note: 3 statements ignored. See "upgrade_exceptions" table for additional details.
Hope this helps.
Re: Back In Stock Notifications
Hi,
What version of MySQL are you using? It appears to be failing with the usage of the @t4 variable in the SQL.
All the best...
Conor
Re: Back In Stock Notifications
Re: Back In Stock Notifications
Correction, MySQL client version: 4.1.7
Sorry about that! :oops:
Re: Back In Stock Notifications
Hi,
Unfortunately I don't know why it won't work then, that seems like a recent enough version.
The SQL code that is failing was based on code from other modules in the download area.
I'm afraid I'm just going to have to post and ask if anyone has a clue what is going wrong.
In the meantime, you could remove the BISN configuration group from your database replace the @t4 variable with an unused configuration group ID and run the SQL again.
Using a hard-coded ID is guaranteed to work but obviously not the way I wanted to offer!
Sorry I can't be more help than that!
It'll have you working in no time, but that's not the nicest solution!
Here's the code, replace the ID in the five places marked with your ID:
Code:
INSERT INTO configuration_group VALUES ('YOURIDHERE', 'Back In Stock Notifications', 'Set Back In Stock Notifications Options', '1', '1');
UPDATE configuration_group SET sort_order = 'YOURIDHERE' WHERE configuration_group_id = 'YOURIDHERE';
INSERT INTO `configuration` ( `configuration_id` , `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `use_function` , `set_function`, `date_added`)
VALUES ('', 'Enable/Disable Back In Stock Notification', 'BACK_IN_STOCK_NOTIFICATION_ENABLED', '1', 'If enabled, when a customer comes across a product that is out of stock, the customer will be offered the chance to be notified when it is back in stock<br /><br />0 = off <br />1 = on', 'YOURIDHERE', '1', NOW(), NULL, 'zen_cfg_select_option(array(''0'', ''1''), ', NOW());
INSERT INTO `configuration` ( `configuration_id` , `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added`)
VALUES ('', 'Send Copy of Back In Stock Notification Subscription E-mails To', 'SEND_EXTRA_BACK_IN_STOCK_NOTIFICATION_SUBSCRIPTION_EMAILS_TO', '', 'Send copy of Back In Stock Notification Subscription e-mails to the following email addresses, in this format: Name 1 <email@address1>, Name 2 <email@address2>', 'YOURIDHERE', '2', NOW(), NOW()
);
All the best...
Conor
Re: Back In Stock Notifications
Sorry to appear a bit stupid but what do you mean by my ID? :blush:
Re: Back In Stock Notifications
Hi,
Quote:
Originally Posted by
Sudakoma
Sorry to appear a bit stupid but what do you mean by my ID? :blush:
Everyone's Zen Cart installation is different so the IDs which are being used of the configurations groups can be different, depending on what 3rd party mods (if any) have been installed.
You need to use a unique ID for the configuration group in the SQL. THh script is supposed to find the first unused one but something's wrong with it on your server so you have to specify it manually.
Log into your admin and move your mouse over the configuration menu. The group IDs will be seen in the URLs displayed in your browser as your mouse pointer moves over each configuration group.
Choose an ID (a number) that's a few higher than the highest one you see and replace the five instances of "YOURIDHERE" in the above script with it, save the script and run it.
All the best..
Conor
Re: Back In Stock Notifications
Ok, I made the changes you posted and ran the script but it made no difference, there are still no options displaying to enable it. :frusty:
Re: Back In Stock Notifications
Hi Conor
In my previous post I was referring to customers that do not have or create an account. Is there a way for them to unsubscribe.
Maybe I have mis understood how it should work in that situation. I thought the link in the email would take them to the product page with an option to unsubscribe.
Have I got this wrong ?
Regards
Laurie