[Skip to main content](#vessel-content)

#   Fixing bug on Vendor email notification

##

- **[sabroso](/forum/user/38789-sabroso "View sabroso's Profile")**
- [![sabroso's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/38789-sabroso "View sabroso's Profile") Topic Author
- [ Offline](/forum/user/38789-sabroso)

Less More

- Posts: 128
- Thank you received: 2
-
-

9 years 7 months ago [\#266001](#266001) by [sabroso](/forum/user/38789-sabroso "View sabroso's Profile")  *[Fixing bug on Vendor email notification](/forum/23-market-how-to/889561-fixing-bug-on-vendor-email-notification#266001 "-- HikaShop version -- : 2.6.4 -- HikaMarket version -- : 1.7.2 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.6  Hi there,  I have noticed a small bug on the Vendor notification email when a coupon is applied to the purchase. When the Vendor is notified about order being created the value of the coupon applied shown in the email is correct. However once the order is confirmed (after payment) the Vendor notification shows a coupon value of 0 which is not correct.  I can see in the HikaMarket change log there was a bug fix in version 1.7.3 for &quot;email notification&quot;, so I wonder how can I apply this fix to HikaMarket 1.7.2 without upgrading to 1.7.3  I'm still not ready to upgrade to HIkashop 3 so I'm still using Hikashop 2.6.4. For that reason I cannot upgrade either to Hikamarket 1.7.3 since it requires Hikashop 3.  But if you let me know in which file you applied the Hikamarket bug fix for &quot;email notification&quot; I can have a look and try to apply it to my hikamarket.  Many thanks!")* was created by *[sabroso](/forum/user/38789-sabroso "View sabroso's Profile")*

-- HikaShop version -- : 2.6.4
-- HikaMarket version -- : 1.7.2
-- Joomla version -- : 3.6.5
-- PHP version -- : 5.6

Hi there,

I have noticed a small bug on the Vendor notification email when a coupon is applied to the purchase. When the Vendor is notified about order being created the value of the coupon applied shown in the email is correct. However once the order is confirmed (after payment) the Vendor notification shows a coupon value of 0 which is not correct.

I can see in the HikaMarket change log there was a bug fix in version 1.7.3 for "email notification", so I wonder how can I apply this fix to HikaMarket 1.7.2 without upgrading to 1.7.3

I'm still not ready to upgrade to HIkashop 3 so I'm still using Hikashop 2.6.4. For that reason I cannot upgrade either to Hikamarket 1.7.3 since it requires Hikashop 3.

But if you let me know in which file you applied the Hikamarket bug fix for "email notification" I can have a look and try to apply it to my hikamarket.

Many thanks!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODg5NTYxLWZpeGluZy1idWctb24tdmVuZG9yLWVtYWlsLW5vdGlmaWNhdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

9 years 7 months ago [\#266005](#266005) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Fixing bug on Vendor email notification](/forum/23-market-how-to/889561-fixing-bug-on-vendor-email-notification#266005 "-- HikaShop version -- : 2.6.4 -- HikaMarket version -- : 1.7.2 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.6  Hi there,  I have noticed a small bug on the Vendor notification email when a coupon is applied to the purchase. When the Vendor is notified about order being created the value of the coupon applied shown in the email is correct. However once the order is confirmed (after payment) the Vendor notification shows a coupon value of 0 which is not correct.  I can see in the HikaMarket change log there was a bug fix in version 1.7.3 for &quot;email notification&quot;, so I wonder how can I apply this fix to HikaMarket 1.7.2 without upgrading to 1.7.3  I'm still not ready to upgrade to HIkashop 3 so I'm still using Hikashop 2.6.4. For that reason I cannot upgrade either to Hikamarket 1.7.3 since it requires Hikashop 3.  But if you let me know in which file you applied the Hikamarket bug fix for &quot;email notification&quot; I can have a look and try to apply it to my hikamarket.  Many thanks!")*

Hello,

The modifications in the email notification where about the loading of the "order number" and some other elements from the database when that data is not available in the order object passed in the trigger.
So yes, it is possible that the patch fix your issue for the coupon.

Now because the patch is composed of a lot different modifications in several files ; it will be very complicated for me to give you a full patch like that.
But you might be able to fix your specific problem with a modification in the order preload.
Replacing Code:

foreach($fs as $f) { if(isset($data-&gt;$f) &amp;&amp; !isset($data-&gt;order-&gt;$f)) $data-&gt;order-&gt;$f = $data-&gt;$f; }

By Code:

foreach($fs as $f) { if(isset($data-&gt;$f) &amp;&amp; !isset($data-&gt;order-&gt;$f)) $data-&gt;order-&gt;$f = $data-&gt;$f; if(isset($data-&gt;old-&gt;$f) &amp;&amp; !isset($data-&gt;order-&gt;$f)) $data-&gt;order-&gt;$f = $data-&gt;old-&gt;$f; }

Because HikaMarket 1.7.3 includes the support of product bundles ; it needs HikaShop 3 otherwise it could generate unwanted side effects.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODg5NTYxLWZpeGluZy1idWctb24tdmVuZG9yLWVtYWlsLW5vdGlmaWNhdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[sabroso](/forum/user/38789-sabroso "View sabroso's Profile")**
- [![sabroso's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/38789-sabroso "View sabroso's Profile") Topic Author
- [ Offline](/forum/user/38789-sabroso)

Less More

- Posts: 128
- Thank you received: 2
-
-

9 years 7 months ago [\#266073](#266073) by [sabroso](/forum/user/38789-sabroso "View sabroso's Profile")  Replied by *[sabroso](/forum/user/38789-sabroso "View sabroso's Profile")* on topic *[Fixing bug on Vendor email notification](/forum/23-market-how-to/889561-fixing-bug-on-vendor-email-notification#266073 "-- HikaShop version -- : 2.6.4 -- HikaMarket version -- : 1.7.2 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.6  Hi there,  I have noticed a small bug on the Vendor notification email when a coupon is applied to the purchase. When the Vendor is notified about order being created the value of the coupon applied shown in the email is correct. However once the order is confirmed (after payment) the Vendor notification shows a coupon value of 0 which is not correct.  I can see in the HikaMarket change log there was a bug fix in version 1.7.3 for &quot;email notification&quot;, so I wonder how can I apply this fix to HikaMarket 1.7.2 without upgrading to 1.7.3  I'm still not ready to upgrade to HIkashop 3 so I'm still using Hikashop 2.6.4. For that reason I cannot upgrade either to Hikamarket 1.7.3 since it requires Hikashop 3.  But if you let me know in which file you applied the Hikamarket bug fix for &quot;email notification&quot; I can have a look and try to apply it to my hikamarket.  Many thanks!")*

Thank you Jerome.

I already have the code you proposed in the preload section of the "Market: Order Status Notification" email. So there is nothing to change.

What else could be tried to fix this problem?

Many thanks!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODg5NTYxLWZpeGluZy1idWctb24tdmVuZG9yLWVtYWlsLW5vdGlmaWNhdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

9 years 7 months ago [\#266080](#266080) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Fixing bug on Vendor email notification](/forum/23-market-how-to/889561-fixing-bug-on-vendor-email-notification#266080 "-- HikaShop version -- : 2.6.4 -- HikaMarket version -- : 1.7.2 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.6  Hi there,  I have noticed a small bug on the Vendor notification email when a coupon is applied to the purchase. When the Vendor is notified about order being created the value of the coupon applied shown in the email is correct. However once the order is confirmed (after payment) the Vendor notification shows a coupon value of 0 which is not correct.  I can see in the HikaMarket change log there was a bug fix in version 1.7.3 for &quot;email notification&quot;, so I wonder how can I apply this fix to HikaMarket 1.7.2 without upgrading to 1.7.3  I'm still not ready to upgrade to HIkashop 3 so I'm still using Hikashop 2.6.4. For that reason I cannot upgrade either to Hikamarket 1.7.3 since it requires Hikashop 3.  But if you let me know in which file you applied the Hikamarket bug fix for &quot;email notification&quot; I can have a look and try to apply it to my hikamarket.  Many thanks!")*

Hello,

I'm afraid that I can't pickup like that the other patches:

> Now because the patch is composed of a lot different modifications in several files ; it will be very complicated for me to give you a full patch like that.

But you should first check the vendor order and verify that the coupon is right copy in the "subsale".

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODg5NTYxLWZpeGluZy1idWctb24tdmVuZG9yLWVtYWlsLW5vdGlmaWNhdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[sabroso](/forum/user/38789-sabroso "View sabroso's Profile")**
- [![sabroso's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/38789-sabroso "View sabroso's Profile") Topic Author
- [ Offline](/forum/user/38789-sabroso)

Less More

- Posts: 128
- Thank you received: 2
-
-

9 years 7 months ago [\#266151](#266151) by [sabroso](/forum/user/38789-sabroso "View sabroso's Profile")  Replied by *[sabroso](/forum/user/38789-sabroso "View sabroso's Profile")* on topic *[Fixing bug on Vendor email notification](/forum/23-market-how-to/889561-fixing-bug-on-vendor-email-notification#266151 "-- HikaShop version -- : 2.6.4 -- HikaMarket version -- : 1.7.2 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.6  Hi there,  I have noticed a small bug on the Vendor notification email when a coupon is applied to the purchase. When the Vendor is notified about order being created the value of the coupon applied shown in the email is correct. However once the order is confirmed (after payment) the Vendor notification shows a coupon value of 0 which is not correct.  I can see in the HikaMarket change log there was a bug fix in version 1.7.3 for &quot;email notification&quot;, so I wonder how can I apply this fix to HikaMarket 1.7.2 without upgrading to 1.7.3  I'm still not ready to upgrade to HIkashop 3 so I'm still using Hikashop 2.6.4. For that reason I cannot upgrade either to Hikamarket 1.7.3 since it requires Hikashop 3.  But if you let me know in which file you applied the Hikamarket bug fix for &quot;email notification&quot; I can have a look and try to apply it to my hikamarket.  Many thanks!")*

Hi Jerome,

The coupon is copied OK in the vendor order (subsale), all the numbers are fine and the discount is applied OK. The problem is that the value of the coupon is printed as zero on the vendor notification email when the order is confirmed. When the order is created, the vendor notification email prints the value of the coupon OK.

OK fine, I understand it is difficult to apply all the modifications you did for Hikamarket 1.7.3 but, would it be possible to find a solution for Hikamarket 1.7.2? How can I help you with this?

Thanks!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODg5NTYxLWZpeGluZy1idWctb24tdmVuZG9yLWVtYWlsLW5vdGlmaWNhdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

9 years 7 months ago [\#266180](#266180) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Fixing bug on Vendor email notification](/forum/23-market-how-to/889561-fixing-bug-on-vendor-email-notification#266180 "-- HikaShop version -- : 2.6.4 -- HikaMarket version -- : 1.7.2 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.6  Hi there,  I have noticed a small bug on the Vendor notification email when a coupon is applied to the purchase. When the Vendor is notified about order being created the value of the coupon applied shown in the email is correct. However once the order is confirmed (after payment) the Vendor notification shows a coupon value of 0 which is not correct.  I can see in the HikaMarket change log there was a bug fix in version 1.7.3 for &quot;email notification&quot;, so I wonder how can I apply this fix to HikaMarket 1.7.2 without upgrading to 1.7.3  I'm still not ready to upgrade to HIkashop 3 so I'm still using Hikashop 2.6.4. For that reason I cannot upgrade either to Hikamarket 1.7.3 since it requires Hikashop 3.  But if you let me know in which file you applied the Hikamarket bug fix for &quot;email notification&quot; I can have a look and try to apply it to my hikamarket.  Many thanks!")*

Hello,

Try to modify your email to use that code for the coupon part Code:

if($shopConfig-&gt;get('price_with_tax')) $t = $currencyHelper-&gt;format($data-&gt;order-&gt;order_discount_price * -1, $data-&gt;order-&gt;order_currency_id); else $t = $currencyHelper-&gt;format(($data-&gt;order-&gt;order_discount_price - @$data-&gt;order-&gt;order_discount_tax) * -1, $data-&gt;order-&gt;order_currency_id);

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODg5NTYxLWZpeGluZy1idWctb24tdmVuZG9yLWVtYWlsLW5vdGlmaWNhdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[sabroso](/forum/user/38789-sabroso "View sabroso's Profile")**
- [![sabroso's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/38789-sabroso "View sabroso's Profile") Topic Author
- [ Offline](/forum/user/38789-sabroso)

Less More

- Posts: 128
- Thank you received: 2
-
-

9 years 7 months ago [\#266214](#266214) by [sabroso](/forum/user/38789-sabroso "View sabroso's Profile")  Replied by *[sabroso](/forum/user/38789-sabroso "View sabroso's Profile")* on topic *[Fixing bug on Vendor email notification](/forum/23-market-how-to/889561-fixing-bug-on-vendor-email-notification#266214 "-- HikaShop version -- : 2.6.4 -- HikaMarket version -- : 1.7.2 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.6  Hi there,  I have noticed a small bug on the Vendor notification email when a coupon is applied to the purchase. When the Vendor is notified about order being created the value of the coupon applied shown in the email is correct. However once the order is confirmed (after payment) the Vendor notification shows a coupon value of 0 which is not correct.  I can see in the HikaMarket change log there was a bug fix in version 1.7.3 for &quot;email notification&quot;, so I wonder how can I apply this fix to HikaMarket 1.7.2 without upgrading to 1.7.3  I'm still not ready to upgrade to HIkashop 3 so I'm still using Hikashop 2.6.4. For that reason I cannot upgrade either to Hikamarket 1.7.3 since it requires Hikashop 3.  But if you let me know in which file you applied the Hikamarket bug fix for &quot;email notification&quot; I can have a look and try to apply it to my hikamarket.  Many thanks!")*

Jerome you're a star!

That fixed the issue, thanks a lot!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODg5NTYxLWZpeGluZy1idWctb24tdmVuZG9yLWVtYWlsLW5vdGlmaWNhdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

9 years 7 months ago [\#266221](#266221) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Fixing bug on Vendor email notification](/forum/23-market-how-to/889561-fixing-bug-on-vendor-email-notification#266221 "-- HikaShop version -- : 2.6.4 -- HikaMarket version -- : 1.7.2 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.6  Hi there,  I have noticed a small bug on the Vendor notification email when a coupon is applied to the purchase. When the Vendor is notified about order being created the value of the coupon applied shown in the email is correct. However once the order is confirmed (after payment) the Vendor notification shows a coupon value of 0 which is not correct.  I can see in the HikaMarket change log there was a bug fix in version 1.7.3 for &quot;email notification&quot;, so I wonder how can I apply this fix to HikaMarket 1.7.2 without upgrading to 1.7.3  I'm still not ready to upgrade to HIkashop 3 so I'm still using Hikashop 2.6.4. For that reason I cannot upgrade either to Hikamarket 1.7.3 since it requires Hikashop 3.  But if you let me know in which file you applied the Hikamarket bug fix for &quot;email notification&quot; I can have a look and try to apply it to my hikamarket.  Many thanks!")*

Great ![:cheer:](/media/kunena/emoticons/2.png ":cheer:")

The patch will be in the next packages.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODg5NTYxLWZpeGluZy1idWctb24tdmVuZG9yLWVtYWlsLW5vdGlmaWNhdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.066 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
