Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Automatic Stock Notification


olsonsp4c

Recommended Posts

This is the support forum for the addon "Automatic Stock Notification"

 

http://addons.oscommerce.com/info/3152

 

This needs to be a community effort, please work together to improve this addon.

 

Scott

Link to comment
Share on other sites

OK, I need some help here. Here are the bugs I've found so far and I'm unsure how to fix them.

 

1. It is supposed to only send emails when stock goes from 0 to MORE than 0 in stock; however, it will send emails whenever the stock is increased. There needs to be a way to query the current (old) stock quantity and store it in a variable (like $prior_products_quantity) and then write an if statement so that the code would look something like this:

 

// BEGIN Automatic Stock Notification
	  if ($prior_products_quantity == 0) {
		 if ($HTTP_POST_VARS['products_quantity'] > 0){			
		   $audience = array();
		   $products_query = tep_db_query("select distinct pn.customers_id, c.customers_firstname, c.customers_lastname, c.customers_email_address from " . TABLE_CUSTOMERS . " c, " . TABLE_PRODUCTS_NOTIFICATIONS . " pn where c.customers_id = pn.customers_id and pn.products_id in ( '" . (int)$products_id . "')");

 

2. If there is more than 1 customer subscribed to product, it sends the name of the 1st customer to ALL customers!!!

 

That's all I've found so far.

 

I need help making this work like it was designed to work.

 

Scott

Edited by olsonsp4c
Link to comment
Share on other sites

Version 2.2 is out. Bug 2 from above is fixed.

 

Since v2.1

----------

* Bugfix: Now sends the correct name in the greeting to each customer when email notifications are sent

* Added support forum in instructions

* Added "What I could use help with" section

 

http://addons.oscommerce.com/info/3152

 

Scott

Link to comment
Share on other sites

So is it safe to say that this MOD only works when the item stock level is manually updated via the Admin Console?

 

Yes - it could be integrated into other addons possibly though.

 

Scott

Edited by olsonsp4c
Link to comment
Share on other sites

  • 3 weeks later...

Hi, thanks for the easy and convenient add-on.

 

I have installed another add-on called "Quick Price Updates v2.5" (http://www.oscommerce.com/community/contributions,122)

 

and was wondering that maybe combine them to make the add-on powerful. :rolleyes:

 

In fact, I have no idea how to do it and hope to give me a hand.

 

Sorry for my poor English ^^

Link to comment
Share on other sites

Everybody,

 

I've updated the addon to version 2.3 and integrated the above fix.

 

* Missed a multi-lingual reference in the email subject, changed catalog/admin/includes/languages/xxxxxxxxxx/categories.php accordingly.

* Updated the addon to work properly when stock is from "out of stock" to "in stock" and not to include stock increases when stock is already greater than 0 (THANKS to ggbig)

* Updated the instructions to include the option to delete or not delete customer email notifications from the database after the email is sent (added step 2b and 3a/b/c/d)

 

http://addons.oscommerce.com/info/3152

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
Maybe I'm missing something but I installed this. Step 1 and 2a in admin / categories and did the changes in languages but I don't see instruction on putting anything in product_info.php??

 

How does the customer get notified?

 

Hi

 

I, too, installed but don't see anything. My question is as above, how does the customer get notified

 

Cheers

 

Ian

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

 

The contribution is working really fine. Really a great tool for the customers.

 

Everywhere you see sold out items online with a notification, so i want to see a report (in the admin section) what is the most wanted product thats sold out at the moment.

 

Is there somebody who this in his shop working and how did you do that?

 

regards,

Jan

Edited by jan64

Dreams can come true, if you help them a littlebit

Link to comment
Share on other sites

Hello,

 

I'm sorry but mine doesn't work. My client don't receive the emails.

 

I installed the contribution "Automatic Stock Notification 2_3" from olsonsp4C, step 1, 2a and 3a.

 

So I modified these files:

 

- admin/categories.php

- admin/includes/configure.php

- admin/includes/languages/french/categories.php

 

Thank you for this one who could help me.

 

Guillaume.

Link to comment
Share on other sites

  • 3 weeks later...

I have the same problem is something missing? Anyone?

 

 

 

Hello,

 

I'm sorry but mine doesn't work. My client don't receive the emails.

 

I installed the contribution "Automatic Stock Notification 2_3" from olsonsp4C, step 1, 2a and 3a.

 

So I modified these files:

 

- admin/categories.php

- admin/includes/configure.php

- admin/includes/languages/french/categories.php

 

Thank you for this one who could help me.

 

Guillaume.

Link to comment
Share on other sites

  • 2 weeks later...
Maybe I'm missing something but I installed this. Step 1 and 2a in admin / categories and did the changes in languages but I don't see instruction on putting anything in product_info.php??

 

How does the customer get notified?

 

The customer is notified over EMAIL

 

Scott

Link to comment
Share on other sites

Hello,

 

I'm sorry but mine doesn't work. My client don't receive the emails.

 

I installed the contribution "Automatic Stock Notification 2_3" from olsonsp4C, step 1, 2a and 3a.

 

So I modified these files:

 

- admin/categories.php

- admin/includes/configure.php

- admin/includes/languages/french/categories.php

 

Thank you for this one who could help me.

 

Guillaume.

 

Could you get me a little more info? have you made sure that your admin email configures has "send mail" and other options turned on? Also, are html emails turned on?

 

Scott

Link to comment
Share on other sites

Link to comment
Share on other sites

  • 2 weeks later...
The customer is notified over EMAIL

 

Scott

 

 

Could you please post the solution to this, I am looking for the same question to be answered. I do not see any change to the product on the catalog side when i 0 the stock. Thanks

What would you do if you knew you could not fail?

Link to comment
Share on other sites

Could you please post the solution to this, I am looking for the same question to be answered. I do not see any change to the product on the catalog side when i 0 the stock. Thanks

 

Hello, there is not supposed to be any visible change in the catalog when stock is 0.

 

When the stock is 0, this addon waits for you to change the stock to MORE than 0, then it notifies the customer that the product is in stock by email. It is all transparent. If you installed the mod that deletes the customer from the notification table, if you are that customer and you are logged in, the button on the product page will change from "Remove Notification" to a normal "Notification" button.

 

Scott

Edited by olsonsp4c
Link to comment
Share on other sites

  • 1 month later...
Hello, there is not supposed to be any visible change in the catalog when stock is 0.

 

When the stock is 0, this addon waits for you to change the stock to MORE than 0, then it notifies the customer that the product is in stock by email. It is all transparent. If you installed the mod that deletes the customer from the notification table, if you are that customer and you are logged in, the button on the product page will change from "Remove Notification" to a normal "Notification" button.

 

Scott

 

I'd really appreciate if someone could explain exactly how this contribution works.

 

How exactly does the customer indicate that they want to be emailed when a product is back in stock?

Link to comment
Share on other sites

  • 2 weeks later...
I'd really appreciate if someone could explain exactly how this contribution works.

 

How exactly does the customer indicate that they want to be emailed when a product is back in stock?

 

Very simple :)

In a 'normal' shop configuration the customer can click the product notifications button (in the right column).

The database contains now a set of information for this specific customer/article (see db=> products_notifications)

 

Cheers Uwe

Link to comment
Share on other sites

  • 2 weeks later...

Hi! I love this feature, however, I am posting in the hopes that someone else has the same problem I do and knows how to fix it.

 

If I go to my website and view an item that is out of stock (I do use the Stock Status in Product Listing contrib, another goodie) and I click on a product to be notified about...BEFORE logging in first...I get redirected to the login page which is fine.

 

But, after I login, rather than being taken back to the item I selected to be notified about...I end up on a page that says 'product not found'.

 

However, if I login first and then start selecting items to be notified about, all is fine.

 

And all is fine after that initial 'product not found' page. That doesn't happen again, once I've logged in and clicked on another item to be notified about. The problem disappears for the remainder of my session.

 

I suspect (which really means I have no idea, lol) the presence of Purchase Without Account in my login.php file may be creating some drama here. It's hard to say. I have a test site (where PWA is not installed) and this does not happen there at all. But, it does happen in my live, working site. Any ideas?

 

Andrea

Link to comment
Share on other sites

  • 1 month later...

I have implemented this mod and had no problems. However, the mod does not notify customers when the Admin restocks itens (that were asked for notification) by deleting orders. The delete order procedure allows the admin to restock ordered itens before deleting.

 

I have made changes to admin/order.php to circunvent that and intend to append them to the contribuition.

 

However, in the codes of both steps 2a and 2b of this contribuition, there is a variable ($email_order) passed as the last parameter to $mimemessage->send:

 

$mimemessage->send($value['firstname'] . ' ' . $value['lastname'], $value['email_address'], STORE_NAME, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT . $product['products_name'], $email_order);

 

that is not referenced anywhere as far as I know. The last parameter of send message method is optional and a non initialized parameter should cause no harm. Am'I missing something here? Is the variable $email_order initialized somewhere?

 

I need to clarify this point before proposing additions to the contribuition.

 

Ronaldo Persiano

Link to comment
Share on other sites

  • 1 month later...

Hello everybody,

 

I have installed this great contribution without problems - I thought.

 

Everything went fine, no errors on any files were found and the stock level is recognized and shown correctly.

It would be perfect if only the notification would be sent out...

 

I had these problems with a similar contribution before which is why I fear that there is something in my installation that stops this function from working.

 

Mails on orders and contact us are working fine with either sendmail or SMTP, either HTML-mails or not.

 

Any hint on where to look for the problem would be appreciated.

 

Thanks in advance

Nala

Link to comment
Share on other sites

Good evening,

 

it does not look as if there many people out there who have got an idea what could be causing my problem.

Though I am beginning to halfway understand how the basic functions in oscommerce are working I haven't got a clue how the mail system works.

 

How come that orders and contact us work fine but the nofications don't?

Where shall I start looking ? What can I test that I haven't tested up to now to narrow down the problem ?

 

Please try to help me.

I am helping my husband besides my 11 hrs a day main job and this add-on would save us a great deal of work.

 

We are selling Hifi classics and often our customers are eagerly waiting for a certain product.

This would save us having to maintain a waiting list and then notifying the customers.

 

Thanks a lot

Nala

Link to comment
Share on other sites

  • 2 weeks later...
Good evening,

 

it does not look as if there many people out there who have got an idea what could be causing my problem.

Though I am beginning to halfway understand how the basic functions in oscommerce are working I haven't got a clue how the mail system works.

 

How come that orders and contact us work fine but the nofications don't?

Where shall I start looking ? What can I test that I haven't tested up to now to narrow down the problem ?

 

Please try to help me.

I am helping my husband besides my 11 hrs a day main job and this add-on would save us a great deal of work.

 

We are selling Hifi classics and often our customers are eagerly waiting for a certain product.

This would save us having to maintain a waiting list and then notifying the customers.

 

Thanks a lot

Nala

 

Hello, Nala,

 

A few days ago a I sent you a private reply to your private message to me. I cannot find my message in the "sent messages" mailbox. Did you received it?

 

Regards,

 

Ronaldo

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...