PrestaShop Forums: [Module] List of customer out of stock registrations - PrestaShop Forums

Jump to content


Welcome to the PrestaShop Forum! We hope you'll share your comments and suggestions with us. We ask that you please post in English to the main sections of the PrestaShop Forum. If you want to write in another language, please post in the corresponding PrestaShop Community section below.

Please note that PrestaShop Community sections are largely self-moderated. PrestaShop team members may or may not participate in non-English sections. To improve the chances of receiving feedback to your question or comment, please post it in English to the main sections of our Forum.

NYC

Vous parlez français ? par ici !


[Module] List of customer out of stock registrations


[Module] List of customer out of stock registrations

#1 presta-dyr

    PrestaShop Addict

  • 11 Jun 2009
  • Moderators
  • 951 posts

Posted 12 March 2010 - 12:36 AM

This small module lists registrations for out of stock products done via the mailalerts module. If customers are registered their name is shown. In any case the e-mail and the product is listed.

Updated 2010-05-27: Fixed bug for multiple pages
Updated 2010-12-18: Added colors and added delete function
Updated 2010-12-18: Fixed count for attributes
Updated 2012-01-18: Fixed count for attributes

/Kjeld

Attached File(s)



#2

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 23 March 2010 - 02:33 PM

Hi,

where can we see customers who are waiting for out of stock products. (which page)

thx

#3

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 23 March 2010 - 02:42 PM

Under the statistics tab.

/Kjeld

#4

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 23 March 2010 - 02:48 PM

ok thx
But i have a problem, because i have uninstall statistics tab on my board ....

#5

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 23 March 2010 - 02:53 PM

You can install it again from the tools->tabs menu.

/Kjeld

Attached File(s)

  • Attached File  stats.png (7bytes)
    Number of downloads: 2675


#6

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 30 April 2010 - 08:07 PM

thanks for the module. its working perfectly!

#7

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 30 April 2010 - 08:29 PM

thanks for works.

#8

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 27 May 2010 - 11:27 PM

There was a bug when the number of customers grew to two pages. I have updated the attachment in the first message in this thread.

/Kjeld

#9

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 28 May 2010 - 12:18 AM

nice one! I will give it a try.

#10

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 13 August 2010 - 12:29 AM

Is there a way to delete the fake lists?
There are a lot showing "your@email.com"

#11

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 29 October 2010 - 07:47 PM

From 1268350571:

This small module lists registrations for out of stock products done via the mailalerts module. If customers are registered their name is shown. In any case the e-mail and the product is listed.

Updated 2010-05-27: Fixed bug for multiple pages

/Kjeld


Thanks, Kjeld! Great work, seems to work perfectly with PS1.3.2

Phil

#12

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 01 November 2010 - 02:23 PM

I am using 1.3.2.3 and have just updated to the newest version (top of thread) still I only see one page of 20 names?

Does this work with 1.3.2.3?

Thanks

Ian

#13

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 01 November 2010 - 02:31 PM

I'm using it on SVN 1.4 and have been using it since 1.2.5 - just compared my code (had to make some changes for 1.4 version) and it's still the same base code for the pagination. Should work for you, maybe you don't have more than 20 mail alerts?

Look in the database, in the "mailalert_customer_oos" table to see how many entries you have.

#14

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 03 November 2010 - 01:50 AM

Possible to add a date column on this?

#15

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 03 November 2010 - 02:46 AM

It is, I have added a date, but it requires modifying the database and core files, as the date is not recorded in the database by default.

If you are willing to make the changes let me know and I'll post up instructions.

#16

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 03 November 2010 - 02:48 AM

That would be great thanks. Is it a risky change?

#17

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 03 November 2010 - 03:07 AM

No risks, just either have to work around the changes if you update, or apply them to the new version files.

Via phpMyAdmin alter the table...
ALTER TABLE `ps_mailalert_customer_oos` ADD `date_add` DATE NOT NULL


-----[ OPEN ]-----
modules/mailalerts/mailalerts.php


-----[ FIND ]-----
    `id_product_attribute` int(10) unsigned NOT NULL,


-----[ ADD AFTER ]-----
    `date_add` date NOT NULL,


-----[ OPEN ]-----
modules/statsoos/statsoos.php


-----[ FIND ]-----
      SELECT `id_customer`, `customer_email`, `id_product`, `id_product_attribute`


-----[ REPLACE WITH ]-----
          SELECT `id_customer`, `customer_email`, `id_product`, `id_product_attribute`, `date_add`


-----[ FIND ]-----
      '.$this->l('Customer').''.$this->l('E-mail').''.$this->l('Product').''.$this->l('Attribute').'';


-----[ REPLACE WITH ]-----
      '.$this->l('Date').''.$this->l('Customer').''.$this->l('E-mail').''.$this->l('Product').''.$this->l('Attribute').'';


-----[ FIND ]-----
    '.$customerName.'


-----[ ADD BEFORE ]-----
                '.$oosPage['date_add'].'


-----[ OPEN ]-----
modules/mailalerts/mailalerts-ajax_add.php


-----[ FIND ]-----
    REPLACE INTO `'._DB_PREFIX_.'mailalert_customer_oos` (`id_customer`, `customer_email`, `id_product` , `id_product_attribute`)
VALUES ('.intval($id_customer).', ''.pSQL($customer_email).'', '.intval($id_product).', '.intval($id_product_attribute).')'))


-----[ REPLACE WITH ]-----
    REPLACE INTO `'._DB_PREFIX_.'mailalert_customer_oos` (`id_customer`, `customer_email`, `id_product` , `id_product_attribute`, `date_add`)
VALUES ('.intval($id_customer).', ''.pSQL($customer_email).'', '.intval($id_product).', '.intval($id_product_attribute).', ''.date('Y-m-d').'')'))


I think these are the only changes, let me know how it goes as I may have forgotten a change somewhere - was awhile ago I added this.

#18

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 20 November 2010 - 02:21 PM

@zenith: thanks for the hack. very useful.

for the last replace, not sure your parenthesis are correct. mine are like this and that work like a charm :)


if (Db::getInstance()->Execute('
REPLACE INTO `'._DB_PREFIX_.'mailalert_customer_oos` (`id_customer`, `customer_email`, `id_product` , `id_product_attribute`, `date_add`)
VALUES ('.intval($id_customer).', ''.pSQL($customer_email).'', '.intval($id_product).', '.intval($id_product_attribute).', ''.date('Y-m-d').'')'))


#19

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 20 November 2010 - 02:50 PM

Happy to help!

It's this forum code that removed the last apostrophe from mine. As long as you have it working ;)

#20

    PrestaShop Newbie

  • 15 Dec 2011
  • Members
  • Pip
  • 0 posts

Posted 15 December 2010 - 11:44 AM

From 1281655766:

Is there a way to delete the fake lists?
There are a lot showing "your@email.com"


yes, would like to be able to delete entries, too. no fakes (yet) but some customers are waiting for products which will not be in stock again, so I would like to get rid of those in the statsoos statistic.

phil





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users