Multi Coupon Extension Causing Checkout Error

  • Posts: 713
  • Thank you received: 37
  • Hikashop Business
1 year 11 months ago #347645

-- HikaShop version -- : 4.7.0
-- Joomla version -- : 3.10.11

So I just purchased & installed the Multi Coupon extension, and during checkout, when I try to add a coupon I get the following error (screenshot attached):

Whoops! Error! Looks like something went wrong. Sorry!
0 Call to a member function quote [] on null

When I turn off the plugin...coupon codes work just fine.

Any advice would be sincerely apprecaited

Thank you

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 11 months ago #347647

Hi,

Thank you for the feedback. I think I found the issue.
When coupons with the "quota per user" setting set were used together with the Multi Coupon plugin, it would generate an error in the checkout.
I've made a patch for that. Download again the install package of the plugin on our website and install it again on yours and it should fix the problem.

Please Log in or Create an account to join the conversation.

  • Posts: 713
  • Thank you received: 37
  • Hikashop Business
1 year 11 months ago #347657

I did as you asked...it's still happening.

Please Log in or Create an account to join the conversation.

  • Posts: 713
  • Thank you received: 37
  • Hikashop Business
1 year 11 months ago #347661

Just in case you need it, here's a screenshot of how I have the coupon I'm using for testing setup.

For testing, I'm trying to purchase a $10.00 item with a $20.00 coupon to make sure it will retain the remaining $10.00 on the user account.

Next test was going to be 2 $5.00 coupons to see if it would deduct both at the same time...but I haven't gone that far yet due to the current issue.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 11 months ago #347658

Then, can you activate the "debug" setting of the Joomla configuration and try again ? It should display an error message with more information.

Please Log in or Create an account to join the conversation.

  • Posts: 713
  • Thank you received: 37
  • Hikashop Business
1 year 11 months ago #347689

Ok so at the top of the error it states the following...

0 Attempt to assign property "coupon_1973" on null

Then under that comes all this...

Call stack
# Function Location
1 () JROOT/plugins/hikashop/multicoupon/multicoupon.php:131
2 plgHikashopMulticoupon->_addCouponAsAdditional() JROOT/plugins/hikashop/multicoupon/multicoupon.php:66
3 plgHikashopMulticoupon->onAfterCartProductsLoad() JROOT/libraries/joomla/event/event.php:70
4 JEvent->update() JROOT/libraries/joomla/event/dispatcher.php:160
5 JEventDispatcher->trigger() JROOT/libraries/src/Application/BaseApplication.php:108
6 Joomla\CMS\Application\BaseApplication->triggerEvent() JROOT/administrator/components/com_hikashop/classes/cart.php:1273
7 hikashopCartClass->getFullCart() JROOT/administrator/components/com_hikashop/helpers/checkout.php:112
8 hikashopCheckoutHelper->getCart() JROOT/administrator/components/com_hikashop/helpers/checkout/coupon.php:48
9 hikashopCheckoutCouponHelper->validate() JROOT/components/com_hikashop/controllers/checkout.php:310
10 checkoutController->submitblock() JROOT/libraries/src/MVC/Controller/BaseController.php:702
11 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_hikashop/helpers/helper.php:2408
12 hikashopController->execute() JROOT/components/com_hikashop/hikashop.php:88
13 require_once() JROOT/libraries/src/Component/ComponentHelper.php:402
14 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377
15 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:194
16 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:233
17 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:225
18 Joomla\CMS\Application\CMSApplication->execute() JROOT/index.php:49

Last edit: 1 year 11 months ago by Dragon41673.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 11 months ago #347691

Hi,

That's not the same error. This is a completely different issue. I'm not sure why you have it, but it seems to be linked to PHP8. I've made another patch for this one. Download again the install package of the plugin on our website and install it again on yours and it should fix this new problem.

Please Log in or Create an account to join the conversation.

  • Posts: 713
  • Thank you received: 37
  • Hikashop Business
1 year 11 months ago #347716

Thank you Nicolas...the new update worked...but...

Now I'm getting a SMTP error at the top of the page which doesn't happen with anything else...screenshot attached. I double checked all my email settings and tested, it's working properly. This doesn't happen on my live site when using coupons, or when on my test site when the multi coupon plugin is disabled. Is there possibly another issue?

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 11 months ago #347723

Hi,

No. The multi coupon plugin has no ilnk to the email sending. The error is not related to the plugin being enabled or not. Please double check, the issue has to be elsewhere.

Please Log in or Create an account to join the conversation.

  • Posts: 713
  • Thank you received: 37
  • Hikashop Business
1 year 11 months ago #347738

I've checked everything, and all my settings for email are correct and I've tested sending & receiving, it works just fine. This doesn't happen any other time except when the plugin is turned on.

Is it possible something with the plugin is triggering that? Just some odd string of code?

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 11 months ago #347740

Hi,

So let's analyse the situation:
- That error indicates that Joomla is not able to connect to the SMTP server configured in the Joomla configuration. Can you confirm that the test email procedure in the Joomla configuration works ?
www.tassos.gr/joomla-extensions/convert-...oting-email-delivery
- Do you see the emails being logged in the Customers>Emails history when the order is created ?
Do you see anything strange if you open them ?
- If you deactivate the "order creation notification" or the "order admin notification", do you still have the issue ?
- You're saying that the issue doesn't happen when the multicoupon plugin is deactivated, but happens when the plugin is activated. Is that correct ?
- When the plugin is activated, does it happen only if you have a coupon in the cart or even if you don't have any coupon in the cart ?

Please Log in or Create an account to join the conversation.

  • Posts: 713
  • Thank you received: 37
  • Hikashop Business
1 year 10 months ago #347779

Just a FYI, I'm working on this, just a hectic time of year for me. So far though, everything is working as it should but still getting the error. I even made a specific email for my test site, have it working, and still getting the error. I'll continue with the rest of the tests, but so far it's looking as this...

- That error indicates that Joomla is not able to connect to the SMTP server configured in the Joomla configuration. Can you confirm that the test email procedure in the Joomla configuration works ? - Yes I can confirm
- Do you see the emails being logged in the Customers>Emails history when the order is created ? - Yes I can confirm
Do you see anything strange if you open them ? - No...nothing odd
- You're saying that the issue doesn't happen when the multicoupon plugin is deactivated, but happens when the plugin is activated. Is that correct ? - Yes I can confirm
- When the plugin is activated, does it happen only if you have a coupon in the cart or even if you don't have any coupon in the cart ? - Only with the coupon in the cart

I had to end testing as my kids needed me and I needed to complete orders...so I will get to this later with more tests...
- If you deactivate the "order creation notification" or the "order admin notification", do you still have the issue ?

Please Log in or Create an account to join the conversation.

  • Posts: 713
  • Thank you received: 37
  • Hikashop Business
1 year 10 months ago #347781

So I was able to test the others...

- Deactivating "order creation notification" - I still get the message
- Deactivating "order admin notification" - I still get the message

HOWEVER

- Deactivating both "order creation notification" and "order admin notification" - I DO NOT get the message


Lastly...I noticed 3 things with using a coupon that is MORE than the amount of the order.

#1 - It gives the attached screenshot at the ending of the checkout process because there's nothing to pay for.

Is there a way to put in something to the effect of "To complete your order please click "Finish" as there is no payment needed"? If not this is going to cause a LOT of confusion and emails for me with people not understanding they need to "finish" the cart as there's no payment.

#2 - As the customer, and as the Admin, I don't get any notification that there was an order placed because of the below issue...

#3 - When using a coupon that is more than the order, there's no payment needed, and as such the order never changes to "confirmed". This is an issue for me because I have it set to remove stock on "confirmed" status only as I get several customers that abandon their cart after it has been created, which causes a MAJOR mess for stock.

Thank you

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 10 months ago #347780

Hi,

Do you have the issue with a coupon in the cart with the plugin deactivated ?

If the emails are in the email history, then HikaShop did send the emails to the email server of your hosting. So either they got blocked by the email server of your hosting, or they got blocked by the email server of the recipient. And supposing that you have the issue with a coupon in the cart with the plugin deactivated, the reason could be the fact that there is a coupon code mentioned in the email, which would lead the email server to flagging the email as spam and rejecting them.

Regarding the orders with a 100% discount, you should activate the "validate free orders" plugin in the Joomla configuration and configure it to change the status of the order appropriately. Also, you can add a "text" block to your checkout workflow with a hkshow tag:
www.hikashop.com/home/blog/471-hikashop-4-4-3.html#tags
For example:

{hkshow maxcart=0.001}Please click on the finish button to validate.{/hkshow}
Or you could try:
{hkshow maxcart=0.001}<script>document.getElementById('hikabtn_checkout_next').click();</script>{/hkshow}
which should auto validate the step (never tested yet).

Last edit: 1 year 10 months ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 713
  • Thank you received: 37
  • Hikashop Business
1 year 10 months ago #347791

So I was trying to test further, and got frustrated so I tried Joomla's test email again and out of nowhere, I'm no longer receiving even the Joomla test emails!!!

I'm reaching out to the host now to try and resolve because I've tried 2 new emails and proper settings, changed passwords, etc. Nothing seems to be working now for emails, not sure what's happening. Oddly, I even tried copying over the live site email info (which is currently working properly as I am receiving all emails from the live site)...and on the test site it doesn't work!!!

Not sure what's up...but I'll figure it out. I'm going to say this has been the issue all along and it just wasn't blocking 100% when I initially started testing. If so...I sincerely apologize for consuming your time on this.

The "validate free orders" thing is super easy, got that activated and going, thank you!

As for the script, I will give that a try, not sure 100% how to implement as I'm still learning...but let me see if I can get that done!

Thank you very much, I sincerely appreciate all the help. I hope you have a wonderful Christmas if you celebrate & I will be in touch if I still have problems after speaking to the host company.

Last edit: 1 year 10 months ago by Dragon41673.

Please Log in or Create an account to join the conversation.

  • Posts: 713
  • Thank you received: 37
  • Hikashop Business
1 year 10 months ago #347794

It's been a host issue all along. They just put into place new security measures and the email now has to be specific to the test domain, not setup as it was originally. VERY frustrating there was no communication from Siteground on this...so I sincerely apologize.

Coupon is working perfectly! Thank you for all the help!

Merry Christmas sir!

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 10 months ago #347793

Hi,

Thank you. Merry Christmas !

Please Log in or Create an account to join the conversation.

Time to create page: 0.087 seconds
Powered by Kunena Forum