coupon error

  • Posts: 8
  • Thank you received: 0
9 years 1 month ago #217820

-- url of the page with the problem -- : esportshop.loltube.cc/index.php/hikashop...cts-listing/checkout
-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.4
-- PHP version -- : 5.6.14
-- Browser(s) name and version -- : any
-- Error-message(debug-mod must be tuned on) -- : Warning: Invalid argument supplied for foreach() in /var/www/html/administrator/components/com_hikaserial/classes/checkout.php on line 45

I create a coupon for this product
esportshop.loltube.cc/index.php/hikashop...oduct/1-pink-sandals

coupon code is
testcoupon

when I checkout and input testcoupon
it show
錯誤
Unknown code,
but it still can discount,
and when I want remove coupon ,
it show message

Warning: Invalid argument supplied for foreach() in /var/www/html/administrator/components/com_hikaserial/classes/checkout.php on line 45

but when user is logined

it can't remove coupon code

please help

Attachments:

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

  • Posts: 26159
  • Thank you received: 4028
  • MODERATOR
9 years 1 month ago #217827

Hi,

About your warning message, please edit the HikaSerial checkout class and replace

	if(count($serials) == 1) {
		$serial = reset($serials);
	} else {
By
	if(count($serials) == 1) {
		$serial = reset($serials);
	} else if(!empty($serials)) {
It will fix the warning display.

The, replace the line
if(empty($cart->coupon)) {
By
if(empty($cart->coupon) || ($coupon == 1 && $qty == 0)) {
And it should re-allow you to remove a coupon.

Regards,


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

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 8
  • Thank you received: 0
9 years 1 month ago #218053

Hello,

thank you for your relay

I edited this file ,
administrator/components/com_hikaserial/classes/checkout.php

and then in login case it works fine

but in guest input couponcode and click apply,
it still show error message
--
錯誤
Unknown code
--
and couponcode apply it

please help how can i fix it .

or i have to edit this file?

components/com_hikaserial/controllers/serial.php

thank you so much

Last edit: 9 years 1 month ago by tellustek.

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

  • Posts: 26159
  • Thank you received: 4028
  • MODERATOR
9 years 1 month ago #218056

Hi,

Do you need to insert HikaShop coupon codes or do you need to insert HikaSerial serials during the checkout ?
Depending the element which should be entered, using the HikaShop "coupon" block in your checkout workflow or the "HikaSerial coupon" will have different effects.

Regards,


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

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.058 seconds
Powered by Kunena Forum