News:

Support the VirtueMart project and become a member

Main Menu

Bug in shopfunctionsF ?

Started by Jose M., July 07, 2017, 17:46:08 PM

Previous topic - Next topic

Jose M.

Hi,
I'm sorry if I'm wrong, but line 520 of the file shopfunctionsf.php I think it should be

if(isset($view->doVendor) && $noVendorMail) {

instead of

if(isset($view->doVendor) && !$noVendorMail) {

That is, that $noVendorMail is TRUE


Thanks
Jose


Milbo

Which version? because it seems it is now already as you suggest.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Jose M.

Hi Milbo!

I have reviewed 3.2.3.9587, 3.2.2 and 3.21

Greetings!

Jose M.

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Jose M.

Hi Milbo,
Is this a feature to send an email to the seller?
Then it only does when $noVendorMail is FALSE and I think it should be when $noVendorMail is TRUE.

I had the problem that when I sent an email to buyers who had indicated "notify me", for each mail to a buyer, he received an email as a seller.
That is, if you send ten emails to ten buyers, the seller also receives ten emails.

Changing !$noVendorMail for $noVendorMail in line 520, it only sends mail to buyers.

Sorry, I'm a bit confused.
Thanks
Jose

Milbo

I was also confused. I read your post exactly the opposite, lol. I read
the code is .... it should be....
But you wrote,.. the code should be that ... instead of this.

But you describe the correct behaviour. This function should send an email to the vendor if "doVendor" is set. For old legacy reasons, we have to use the isset. Of course it should be just one boolean, that would be easier. As you can see the code has a comment

//TODO this is quirk, why it is using here $noVendorMail, but everywhere else it is using $doVendor => this make logic trouble

The code was written by a lot people. But back to the problem.


if(isset($view->doVendor) && !$noVendorMail) {

The standard is $noVendorMail=false, this means, when a doVendor is set, then it sends the vendor email.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Jose M.

Hello,
I am sorry, I do not speak English and I can not explain it well.

The question is that now, send mail when $noVendorMail is FALSE or not set.

Thanks
Regards

Jose

Milbo


if(isset($view->doVendor) && !$noVendorMail) {


It should send the vendor email for

doVendor = true and $noVendorMail=false

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Jose M.