VirtueMart Forum

VirtueMart 2 + 3 => Virtuemart Development and bug reports => Topic started by: willxiao0790 on April 23, 2012, 18:43:55 pm

Title: "Notify me" and Waiting list
Post by: willxiao0790 on April 23, 2012, 18:43:55 pm
Hi all,

I'm using J2.5.4 and VM2.0.6 (with AIO 2.0.6a)

I think there is a bug of Notify me/Waiting list in product backend (See attached 1)

System successful recorded the email of customer who clicked "Notify me" button 

However when I try to update the stock level, I got the below error message
--------
500 - An error has occurred.
View not found [name, type, prefix]: waitinglist, html, virtuemartView
Return to Control Panel
--------

I think because the system can't find the name, type and prefix of people who clicked Notify me button as Guest. (See attached 2)

If I clicked back, the stock level was updated, but no notification email sent out to customers.

-------------


Additionally, when I used VM2.0 to VM2.0.2G, the add to cart popup works fine.

After I did upgrade to VM2.0.6, the add to cart popup won't appear anymore. (I tried with default template atomic and Beez5)

I'm sure that I did check the box of "Display modal popup upon 'Add to cart' " and tried to enable/disable the JQuery of template and JQuery of VM


Any solution would be much appreciated!
Cheers,


[attachment cleanup by admin]
Title: Re: "Notify me" and Waiting list
Post by: teobgeno on April 24, 2012, 06:30:33 am
I just examine your issue

At administrator/components/com_virtuemart/models/waitinglist.php at line 85


if (shopFunctionsF::renderMail('waitinglist', $waiting_user->notify_email, $vars))
{
   $this->update($waiting_user->notify_email, $virtuemart_product_id);
}


The waitinglist is a view template that is not exist . The views of vm located at components/com_virtuemart/views .So in order for this to work there should be a folder waitinglist listed there containing the proper view.html.php and the tpl folder with the php template file(s). But that view not exist and that's why your 500 error . So i change just for testing the waitinglist parameter with a valid view ( invoice ). No more 500 error cause now the template view was ok but it throws me error
Fatal error: Call to undefined method VirtueMartModelWaitingList::update() in C:\xampp\htdocs\photo3\administrator\components\com_virtuemart\models\waitinglist.php on line 86

That is because

$this->update($waiting_user->notify_email, $virtuemart_product_id); is a function that does not exist in this class VirtueMartModelWaitingList neither at JModel parent class.

In conclusion for this waitinglist procedure in order to function properly there must be a valid view and after that a valid function (update) on this class that ,i think, updates jos_virtuemart_waitingusers notified field. It is better having an answer first from virtumart team .


Title: Re: "Notify me" and Waiting list
Post by: slutsker on April 28, 2012, 16:19:20 pm
i also see this problem - need help
Title: Re: "Notify me" and Waiting list
Post by: Vian on May 02, 2012, 14:59:33 pm
I'm having the same issue as described in the posts above.

Should we wait for an answer or code our way out of that problem? I think I can use other views as example and get this thing going on my website, but I'm not sure if its worth the time since it might be solved soon.

Title: Re: "Notify me" and Waiting list
Post by: Studio 42 on May 02, 2012, 18:29:24 pm
Hi,
We are on writing the missing code.
The view files are simply missing. Comming soon...
Title: Re: "Notify me" and Waiting list
Post by: Vian on May 02, 2012, 18:44:30 pm
Thank you for the quick answer. ;)
Title: Re: "Notify me" and Waiting list
Post by: Welker on May 05, 2012, 18:14:36 pm
It happens here too, have a solution?
Title: Re: "Notify me" and Waiting list
Post by: Welker on May 06, 2012, 21:12:29 pm
Someone?
Title: Re: "Notify me" and Waiting list
Post by: slutsker on May 08, 2012, 09:40:29 am
Hi,
We are on writing the missing code.
The view files are simply missing. Comming soon...

we are still waiting
Title: Re: "Notify me" and Waiting list
Post by: serapol on May 08, 2012, 10:05:14 am
Posted by mini quickly decide if someone urgently needed. You must copy the files from the archive with the replacement in the appropriate folder, and add two variables in the language file.

If you are using Joomla 2.5 then you can add via overriding language constants for the administration of the site. If you are using Joomla 1.5 then will have to add the language file Virtuemart

Code: [Select]
COM_VIRTUEMART_MAIL_NOTYFI_SUBJECT_USER = "Product %s is again in stock. %s"
COM_VIRTUEMART_MAIL_NOTYFI_TEXT_SHOPPER = "Hello \n\n We are glad to inform you that the goods are %1$ s went back to our warehouse and available for order. \n Order %1$ s can be the link: %2$s \n \n We will be glad to see you our customers! \n\n Sincerely, %3$s"


I can add extra features like the ability to registered users see which products are expected to remove yourself from the list, the ability to view a list of items in admin are now waiting for the people, etc.

But don `t know whether to spend time on it if the team will make its own decision.

[attachment cleanup by admin]
Title: Re: "Notify me" and Waiting list
Post by: Milbo on May 08, 2012, 18:33:17 pm
The waiting list is atm WIP,

we work on it, you can have a preview using the latest beta http://dev.virtuemart.net/projects/virtuemart/files


and again Serapol, what is your problem. Look how many people work on virtuemart. Read the devguide http://dev.virtuemart.net/projects/virtuemart/wiki/Developer_guideline.

You delivered already a lot fixes and every post of you influenced the core!
Title: Re: "Notify me" and Waiting list
Post by: serapol on May 08, 2012, 18:47:53 pm
I know that you are working on this problem so did a small fix for people at the moment. The reason that this is not an issue as the lack of a certain functional, and I did not undertake to write to then it does not interfere with your decision.

By the way planning to implement those functions in the functionality that I described, because the me they desperately needed?. If you plan to, I'll wait for your decision, if not then will have to sharpen for themselves.

Thank you for your reply!
Title: Re: "Notify me" and Waiting list
Post by: Milbo on May 08, 2012, 19:12:53 pm
In fact we just need someone who is eager to finish the work 90% done. We just got distracted by support for customers which already payed and similar. When you are interested, take a look at the svn, write a pm to me, and then we can connect in skype.
Title: Re: "Notify me" and Waiting list
Post by: Welker on May 08, 2012, 20:58:25 pm
Posted by mini quickly decide if someone urgently needed. You must copy the files from the archive with the replacement in the appropriate folder, and add two variables in the language file.

If you are using Joomla 2.5 then you can add via overriding language constants for the administration of the site. If you are using Joomla 1.5 then will have to add the language file Virtuemart

Code: [Select]
COM_VIRTUEMART_MAIL_NOTYFI_SUBJ_SHOPPER = "Product %s is again in stock. %s"
COM_VIRTUEMART_MAIL_NOTYFI_TEXT_SHOPPER = "Hello \n\n We are glad to inform you that the goods are %1$ s went back to our warehouse and available for order. \n Order %1$ s can be the link: %2$s \n \n We will be glad to see you our customers! \n\n Sincerely, %3$s"


I can add extra features like the ability to registered users see which products are expected to remove yourself from the list, the ability to view a list of items in admin are now waiting for the people, etc.

But don `t know whether to spend time on it if the team will make its own decision.

Not work  :o

I have caching turned off.
Title: Re: "Notify me" and Waiting list
Post by: serapol on May 08, 2012, 21:27:22 pm
What exactly is not working, what error is?
Title: Re: "Notify me" and Waiting list
Post by: Welker on May 08, 2012, 21:29:32 pm
What exactly is not working, what error is?

Same error:

Quote
500 - Ocorreu um erro.
Visualização não encontrada [nome, tipo, prefixo]: waitinglist, html, virtuemartView

Retornar ao Painel de Controle
Title: Re: "Notify me" and Waiting list
Post by: serapol on May 08, 2012, 21:34:59 pm
I accidentally put the views in the wrong folder. Archive of the changes is attached.

Do you have a folder "components" should appear in the folder "views", delete it

[attachment cleanup by admin]
Title: Re: "Notify me" and Waiting list
Post by: Welker on May 08, 2012, 22:07:54 pm
I accidentally put the views in the wrong folder. Archive of the changes is attached.

Do you have a folder "components" should appear in the folder "views", delete it

It worked perfectly now ;D

It only remains to add the constants in the language file.

Thank you very much.
Title: Re: "Notify me" and Waiting list
Post by: Welker on May 08, 2012, 22:35:20 pm
The constant you posted is wrong, instead of

Code: [Select]
COM_VIRTUEMART_MAIL_NOTYFI_SUBJ_SHOPPER
is

Code: [Select]
COM_VIRTUEMART_MAIL_NOTYFI_SUBJECT_USER.
Title: Re: "Notify me" and Waiting list
Post by: serapol on May 08, 2012, 22:41:07 pm
Thanks for the tip, I renamed the variables, and the views forgot
Title: Re: "Notify me" and Waiting list
Post by: antonitus on May 09, 2012, 10:15:24 am
##### TEMPORARILY SOLVED #####

There's a solution to this problem in post: http://forum.virtuemart.net/index.php?topic=101933.0 by seyi.  It works a treat and it sends an email to the person who wants to be notified and you no longer get the 500 error.  It is a brilliant script by seyi so thank you to him/her.  I tried it on V2.0.7, but it doesn't work there, it only seems to work on stable V2.0.6, but I'm sure it can be tweaked to work on any future versions.  I think the VM devs should take note of this script as I am using it and it works just fine.

The only thing I don't understand is, why is username and name being used in the waiting list when there is no entry to be made for these fields.  Also, there has to be a feature where we can edit/delete/manage notified users in the waiting list.  This would be excellent.  I hope this helps people.
Title: Re: "Notify me" and Waiting list
Post by: slutsker on May 10, 2012, 09:32:18 am
i absolutly agree

when somebody asks for notification why we ask inly for a mail?

it is obvious to ask user's phone/skype/name/icq so it is possible to connet to him and suggest other product

and now: because there is no list of all waiting users - it is necessary to check each product
Title: Re: "Notify me" and Waiting list
Post by: antonitus on May 10, 2012, 10:13:55 am
I'm sure the VM devs are aware of this. They have done some work on this feature in V2.0.7 and you still get the 500 error, but I feel it still needs more tweaking.  Maybe they fixed it in V2.0.7a, which I am going to test today.  At the moment you have to physically go into the database (phpMyAdmin) to delete the users in the waiting list table.  And for most people, they wouldn't know how to do that.  I'm hoping they'll do more work on this in the next few versions.