Zen Cart Logo
Forums / All Other Contributions/Addons / Back In Stock Notifications

Back In Stock Notifications

Views: 71,748

Results 401 to 420 of 507
10 Jul 2010, 8:57 PM
#401
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

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

10 Jul 2010, 10:39 PM
#402
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Back In Stock Notifications

Hi,

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

10 Jul 2010, 10:45 PM
#403
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Back In Stock Notifications

bingo - did that while trying to fix the other. Thanks!

14 Jul 2010, 12:01 AM
#404
nishajh avatar

nishajh

Zen Follower

Join Date:
May 2009
Posts:
105
Plugin Contributions:
0

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

14 Jul 2010, 6:53 AM
#405
nishajh avatar

nishajh

Zen Follower

Join Date:
May 2009
Posts:
105
Plugin Contributions:
0

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']
			);
14 Jul 2010, 8:14 AM
#406
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Back In Stock Notifications

Hi,

nishajh:

I am getting error 1066 Not unique table/alias: 'njm'

Simply remove the following from the code you posted and it will work:

, 
                        ". 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
        // 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
        // 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
<ceon:variable name="product_name">Product Number One</ceon:variable>
```to:

```php
<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](http://dev.ceon.net)
14 Jul 2010, 8:28 AM
#407
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Back In Stock Notifications

Hi,

In the above, PRODUCT_INFO should be FILENAME_PRODUCT_INFO

All the best...

Conor

14 Jul 2010, 9:02 PM
#408
nishajh avatar

nishajh

Zen Follower

Join Date:
May 2009
Posts:
105
Plugin Contributions:
0

Re: Back In Stock Notifications

Hi,

Thank you very much for the help

I made the following changes in tpl_account_back_in_stock_notifications_default.php

	// 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(FILENAME_PRODUCT_INFO, 'products_id=' $subscribed_notification_lists[$i]['id']);
        $back_in_stock_notifications_item->setVariable('product_info_page_link', $product_info_page_link);

and in file inc.html.back_in_stock_notifications.html

<!-- ceon-begin-part ACCOUNT_BACK_IN_STOCK_NOTIFICATIONS_ITEM1 -->
		<tr>
			<td class="AccountBackInStockNotificationsListing AccountBackInStockNotificationsListingCellRow1"><ceon:variable name="checkbox"><input type="checkbox checked="checked" /></ceon:variable></td>
			<td class="AccountBackInStockNotificationsListing AccountBackInStockNotificationsListingCellRow1"><a href="{ceon:product_info_page_link}"><ceon:variable name="product_model">Product Model</ceon:variable> - <ceon:variable name="product_name">Product Number One</ceon:variable> </a> </td>
			<td class="AccountBackInStockNotificationsListing AccountBackInStockNotificationsListingCellRow1"><ceon:variable name="date_subscribed">23rd March</ceon:variable></td>
		</tr>
		<!-- ceon-end-part ACCOUNT_BACK_IN_STOCK_NOTIFICATIONS_ITEM1 -->
		<!-- ceon-begin-part ACCOUNT_BACK_IN_STOCK_NOTIFICATIONS_ITEM2 -->
		<tr>
			<td class="AccountBackInStockNotificationsListing AccountBackInStockNotificationsListingCellRow2"><ceon:variable name="checkbox"><input type="checkbox checked="checked" /></ceon:variable></td>
			<td class="AccountBackInStockNotificationsListing AccountBackInStockNotificationsListingCellRow2"><a href="{ceon:product_info_page_link}"><ceon:variable name="product_model">Product Model</ceon:variable> - <ceon:variable name="product_name">Product Number One</ceon:variable> </a></td>
			<td class="AccountBackInStockNotificationsListing AccountBackInStockNotificationsListingCellRow2"><ceon:variable name="date_subscribed">23rd March</ceon:variable></td>
		</tr>
		<!-- ceon-end-part ACCOUNT_BACK_IN_STOCK_NOTIFICATIONS_ITEM2 -->

RESULT

The page becomes blank when I enable the Add a link to the product's page portion in file tpl_account_back_in_stock_notifications_default.php and when I Comment this portion it shows the product model and name and also has a link. But when I click on the link I get this error message
/%7Bceon:product_info_page_link%7D 404

14 Jul 2010, 10:39 PM
#409
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Back In Stock Notifications

Hi,

nishajh:

// Add a link to the product's page
$product_info_page_link = zen_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $subscribed_notification_lists[$i]['id']);
$back_in_stock_notifications_item->setVariable('product_info_page_link', $product_info_page_link);

There should be a dot between 'products_id=' and $subscribed_notification_lists[$i]['id'] (I've added it above, marked in red).

Without that you get a PHP error which is why you see the blank page.

Please learn that for the future.. it should have been obvious for you to fix.. I can see that I missed it in my original reply to you but I was writing code off the top of my head and not testing it. In testing the code, it would have been immediately obvious that the dot was missing... anyone who knows PHP should have spotted my error themselves.

There are many decent books on PHP.. if you are going to do things yourself I recommend you read one! :)

nishajh:

when I Comment this portion it shows the product model and name and also has a link. But when I click on the link I get this error message
/%7Bceon: product_info_page_link%7D 404

That's because you commented out the code to set the link! (Again that would be obvious if you could read PHP).

That should be enough information now for you. If you find any other errors please try reading up a bit more on PHP first and post if you are still having trouble.

All the best..

Conor
ceon

15 Jul 2010, 7:26 AM
#410
nishajh avatar

nishajh

Zen Follower

Join Date:
May 2009
Posts:
105
Plugin Contributions:
0

Re: Back In Stock Notifications

Thank you :smile:

Love this mod in the site

15 Jul 2010, 8:39 AM
#411
dome90uk avatar

dome90uk

New Zenner

Join Date:
Nov 2009
Posts:
16
Plugin Contributions:
0

Re: Back In Stock Notifications

Hi Conor,

Another happy customer here .... great mod !

Is the mod compatible with 1.3.9d?

Thanks again.

15 Jul 2010, 8:44 AM
#412
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Back In Stock Notifications

Hi,

dome90uk:

Another happy customer here

As the software and support on this forum are both free, there's no such thing as a "customer" regarding this module, we earn nothing whatsoever from having written it or from providing support.

dome90uk:

.... great mod !

I'm very glad you like it though! :)

dome90uk:

Is the mod compatible with 1.3.9d?

Yes, just get the latest version from our website. It'll also be available from the Zen Cart downloads area shortly, haven't had time to get it uploaded to the downloads area yet.

All the best..

Conor
ceon

15 Jul 2010, 6:43 PM
#413
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Back In Stock Notifications

me again, Conor,

The mod is all working now except one minor point. Customers cannot remove products from the notification lists in their account. Uncheck the box and click update and it just refreshes the screen.

15 Jul 2010, 7:19 PM
#414
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Back In Stock Notifications

Hi,

delia:

The mod is all working now except one minor point. Customers cannot remove products from the notification lists in their account. Uncheck the box and click update and it just refreshes the screen.

Not sure what you've done wrong there.

Please get in contact via this address with FTP and admin details for the site in question and I'll take a look.

Oh, and a link to a product which is out of stock please.

All the best..

Conor
ceon

20 Aug 2010, 7:19 AM
#415
faithtong avatar

faithtong

New Zenner

Join Date:
Mar 2009
Posts:
21
Plugin Contributions:
0

Re: Back In Stock Notifications

Hi, I have just installed this great software, however, I noticed that the product name of my foreign language, chinese came out to be strange/ alien words, can I know what went wrong?

see the attachment, the product name is displayed of the back in stock notification page as very strange words...., the product name under english page is all normal and alright. Can anyone help???

20 Aug 2010, 9:45 AM
#416
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Back In Stock Notifications

Hi,

faithtong:

see the attachment, the product name is displayed of the back in stock notification page as very strange words...., the product name under english page is all normal and alright. Can anyone help???

You are probably using an older version of the software. Please upgrade to 2.6.0 as it can handle the full UTF charset.

http://dev.ceon.net/web/zen-cart/back_in_stock_notifications

All the best..

Conor
ceon

20 Aug 2010, 10:55 AM
#417
faithtong avatar

faithtong

New Zenner

Join Date:
Mar 2009
Posts:
21
Plugin Contributions:
0

Re: Back In Stock Notifications

Thanks for your prompt reply。 I have just installed the latest version of your back_in_stock 2.6, however, my chinese page still showing the strange character. Please check the attached picture file below.

(when I copied these strange character, often starts with &# then followed by 5 numeric numbers, for instance: "&#31036" to zencart backpanel\Developer tool kit Search, the system will automatically convert it (if I am under Chinese mode) to the correct Chinese words, any advice?)

20 Aug 2010, 11:18 AM
#418
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Back In Stock Notifications

Hi,

faithtong:

(when I copied these strange character, often starts with &# then followed by 5 numeric numbers, for instance: "&#31036" to zencart backpanel\Developer tool kit Search, the system will automatically convert it (if I am under Chinese mode) to the correct Chinese words, any advice?)

Make sure your Zen Cart CHARSET is set to UTF.

If it already is or that doesn't do it then I'm afraid I can't help you at this time.. try asking again in a week or two, I'll not be able to reply before then.

All the best...

Conor
ceon

21 Aug 2010, 12:19 AM
#419
faithtong avatar

faithtong

New Zenner

Join Date:
Mar 2009
Posts:
21
Plugin Contributions:
0

Re: Back In Stock Notifications

conor:

Hi,

Make sure your Zen Cart CHARSET is set to UTF.

If it already is or that doesn't do it then I'm afraid I can't help you at this time.. try asking again in a week or two, I'll not be able to reply before then.

All the best...

Conor
ceon

I have tried to change all my charset to utf-8, however, it doesn't solve my case. :no: All my Chinese pages are showing alright (including the back_in_stock page at admin backpanel) besides my account_back_in_stock .

I will wait for your reply when you are back then. Thanks in advance!!!

21 Aug 2010, 11:40 AM
#420
qisahn avatar

qisahn

New Zenner

Join Date:
Jun 2006
Posts:
28
Plugin Contributions:
0

Re: Back In Stock Notifications

This is coming 2 years late, but your module rocks! Thank you!

I just updated from 2.2.4 (as per the zen cart downloads page) to 2.60, but am having problems producing the correct link in the sentence "To be notified when this product is back in stock please click here."

The link at my product page causes the entire page to reload before scrolling down to the "Back in stock notification" box at the bottom.

The link at my product listing page is however broken because it also takes in this "sort" attribute. For example.. instead of qisahn.com/sony-playstation-3-brand-new-games-c-33_35/call-of-duty-modern-warfare-2-r1-p-1830#back_in_stock_notification_form it does qisahn.com/sony-playstation-3-brand-new-games-c-33_35/sort/20a/call-of-duty-modern-warfare-2-r1-p-1830#back_in_stock_notification_form

I can't figure what is wrong. As a temporary fix, I changed the code in functions_general

from

$params .= '&products_id=' . $product_id;

to

$params = '&products_id=' . $product_id;

I'll appreciate any help you can provide :)