Re: Back In Stock Notifications
Hi Peter,
Quote:
Originally Posted by
papyria
Conor,
Actually, that wasn't me, that was countrycharm, he deserves your thanks! :)
Quote:
Originally Posted by
papyria
Loh and behold after this posting on the board, suddenly the exact functionality appeared on my site as you described it.
I'm glad you've got the installation problem sorted and now the module is working as expected, sending e-mails with unsubscription codes if the user doesn't have an account.
I hope it helps your sales! :)
All the best..
Conor
ceon
Re: Back In Stock Notifications
Conor, small problem. We moved a site that had this mod installed and now it's throwing this error:
Warning: require_once(/home/regimen1/public_htm/shop/admin/includes/functions/back_in_stock_notifications_functions.php) [function.require-once]: failed to open stream: No such file or directory in /home/regimen1/public_html/shop/admin/back_in_stock_notifications.php on line 18
I've checked and the file is there. We've made no other changes. Version is 1.3.8a. I'm pretty sure it was working before the move but have asked client to be sure.
I can't imagine why it can't find the file. Any ideas?
Re: Back In Stock Notifications
Hi,
Quote:
Originally Posted by
delia
I can't imagine why it can't find the file. Any ideas?
When moving the site you've forgotten to update admin/includes/configure.php with the new path to the admin directory.
Enjoy the rest of your weekend!
All the best..
Conor
ceon
Re: Back In Stock Notifications
ahem, yes, that would be possible! Thanks, Conor!
Oh for the lack of one l in a config file
But now I get this:
Fatal error: Cannot redeclare sendbackinstocknotifications() (previously declared in /home/regimen1/public_html/shop/admin/includes/functions/extra_functions/back_in_stock_notifications_functions.php:30) in /home/regimen1/public_html/shop/admin/includes/functions/back_in_stock_notifications_functions.php on line 212
Re: Back In Stock Notifications
Hi,
Quote:
Originally Posted by
delia
But now I get this:
Fatal error: Cannot redeclare sendbackinstocknotifications() (previously declared in /home/regimen1/public_html/shop/admin/includes/functions/extra_functions
You've accidentally put the functions file in both the functions folder and the extra_functions folder within the admin. Delete the copy in the admin/includes/extra_functions folder.
All the best..
Conor
ceon
Re: Back In Stock Notifications
bingo - did that while trying to fix the other. Thanks!
Re: Back In Stock Notifications
Hi,
can anyone give the code to make the change in the back in stock notification screen?
At present when the customer goes to his account area to check the back in stock subscription list it shows
Subscribed Product Date Subscribed
I want to show the
Subscribed product name (product Model) Date Subscribed
product name (product Model) - Should be a link to the items catalog page
Thank you
Re: Back In Stock Notifications
I am getting error 1066 Not unique table/alias: 'njm'
while trying to get the model number to print in the back in stock notification page in my account area.
I am making the changes in file includes/modules/pages/account_back_in_stock_notifications/header_php.php
Any Help?
--------------------------------------------------------------
$subscribed_notification_lists_query = "
SELECT
bisns.id, bisns.product_id, pd.products_name, bisns.date_subscribed, njm.products_model
FROM
" . TABLE_BACK_IN_STOCK_NOTIFICATION_SUBSCRIPTIONS . " bisns ,
". TABLE_PRODUCTS . " njm
LEFT JOIN
" . TABLE_PRODUCTS . " njm
ON
bisns.product_id = njm.products_id
LEFT JOIN
" . TABLE_PRODUCTS_DESCRIPTION . " pd
ON
bisns.product_id = pd.products_id
LEFT JOIN
" . TABLE_CUSTOMERS . " c
ON
c.customers_id = bisns.customer_id
WHERE
(bisns.customer_id = '" . (int) $customer_id . "'
OR
c.customers_email_address = bisns.email_address)
AND
pd.language_id = '" . (int)$_SESSION['languages_id'] . "';";
$subscribed_notification_lists_result = $db->Execute($subscribed_notification_lists_query);
if ($subscribed_notification_lists_result->RecordCount() == 0) {
// User is not subscribed to any back in stock notification lists
} else {
// Build the list of notification lists to which this user is subscribed
while (!$subscribed_notification_lists_result->EOF) {
$subscribed_notification_lists[] = array(
'id' => $subscribed_notification_lists_result->fields['id'],
'product_id' => $subscribed_notification_lists_result->fields['product_id'],
'product_name' => $subscribed_notification_lists_result->fields['products_name'],
'product_model' => $subscribed_notification_lists_result->fields['products_model'],
'date' => $subscribed_notification_lists_result->fields['date_subscribed']
);
Re: Back In Stock Notifications
Hi,
Quote:
Originally Posted by
nishajh
I am getting error 1066 Not unique table/alias: 'njm'
Simply remove the following from the code you posted and it will work:
PHP Code:
,
". TABLE_PRODUCTS . " njm
(Don't forget to remove that comma!)
As for having the model appended to the product's name and the name and model link to the product page, you'll need to modify
includes/templates/template_default/templates/tpl_account_back_in_stock_notifications_default.php
change:
PHP Code:
// Add the product's name
$product_name =
htmlentities($subscribed_notification_lists[$i]['product_name'], ENT_COMPAT, CHARSET);
$back_in_stock_notifications_item->setVariable('product_name', $product_name);
to
PHP Code:
// Add the product's name
$product_name =
htmlentities($subscribed_notification_lists[$i]['product_name'], ENT_COMPAT, CHARSET);
$back_in_stock_notifications_item->setVariable('product_name', $product_name);
// Add the product's model
$product_model =
htmlentities($subscribed_notification_lists[$i]['product_model'], ENT_COMPAT, CHARSET);
$back_in_stock_notifications_item->setVariable('product_model', $product_model);
// Add a link to the product's page
$product_info_page_link = zen_href_link(PRODUCT_INFO, 'products_id='
$subscribed_notification_lists[$i]['id']);
$back_in_stock_notifications_item->setVariable('product_info_page_link',
$product_info_page_link);
Finally, you'll need to update the template file to use the variables you'd just "placed" with the new code above (courtesy of Ceon's cool template system):
includes/templates/template_default/templates/inc.html.back_in_stock_notifications.html
In ACCOUNT_BACK_IN_STOCK_NOTIFICATIONS_ITEM1 and ACCOUNT_BACK_IN_STOCK_NOTIFICATIONS_ITEM2 change:
PHP Code:
<ceon:variable name="product_name">Product Number One</ceon:variable>
to:
PHP Code:
<a href="{ceon:product_info_page_link}"><ceon:variable name="product_name">Product Number One</ceon:variable> (<ceon:variable name="product_model">Product Model</ceon:variable>)</a>
That's it! (You can opt not to use the brackets around the model, just remove them from the template code).
Easy with Ceon's template system! :)
Glad you like the software!
All the best..
Conor
ceon
Re: Back In Stock Notifications
Hi,
In the above, PRODUCT_INFO should be FILENAME_PRODUCT_INFO
All the best...
Conor