Author Topic: Bug in shopfunctionsF ?  (Read 287 times)

Jose M.

  • Beginner
  • *
  • Posts: 41
Bug in shopfunctionsF ?
« on: July 07, 2017, 17:46:08 pm »
Hi,
I'm sorry if I'm wrong, but line 520 of the file shopfunctionsf.php I think it should be

Code: [Select]
if(isset($view->doVendor) && $noVendorMail) {
instead of

Code: [Select]
if(isset($view->doVendor) && !$noVendorMail) {
That is, that $noVendorMail is TRUE


Thanks
Jose


Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9092
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Bug in shopfunctionsF ?
« Reply #1 on: July 07, 2017, 19:42:09 pm »
Which version? because it seems it is now already as you suggest.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Jose M.

  • Beginner
  • *
  • Posts: 41
Re: Bug in shopfunctionsF ?
« Reply #2 on: July 07, 2017, 21:45:43 pm »
Hi Milbo!

I have reviewed 3.2.3.9587, 3.2.2 and 3.21

Greetings!

Jose M.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9092
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Jose M.

  • Beginner
  • *
  • Posts: 41
Re: Bug in shopfunctionsF ?
« Reply #4 on: July 12, 2017, 18:18:18 pm »
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
Code: [Select]
!$noVendorMail for
Code: [Select]
$noVendorMail in line 520, it only sends mail to buyers.

Sorry, I'm a bit confused.
Thanks
Jose

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9092
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Bug in shopfunctionsF ?
« Reply #5 on: July 13, 2017, 07:48:46 am »
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
Code: [Select]
//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.

Code: [Select]
if(isset($view->doVendor) && !$noVendorMail) {
The standard is $noVendorMail=false, this means, when a doVendor is set, then it sends the vendor email.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Jose M.

  • Beginner
  • *
  • Posts: 41
Re: Bug in shopfunctionsF ?
« Reply #6 on: July 13, 2017, 09:54:34 am »
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9092
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Bug in shopfunctionsF ?
« Reply #7 on: July 25, 2017, 08:20:46 am »
Code: [Select]
if(isset($view->doVendor) && !$noVendorMail) {

It should send the vendor email for

doVendor = true and $noVendorMail=false

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

Jose M.

  • Beginner
  • *
  • Posts: 41
Re: Bug in shopfunctionsF ?
« Reply #8 on: July 25, 2017, 22:43:24 pm »
Thanks!

Jose