Skip to main content

coupon error

11 years 4 weeks ago #217820 by tellustek
coupon error was created by tellustek
-- 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

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

11 years 4 weeks ago #217827 by Jerome
Replied by Jerome on topic coupon error
Hi,

About your warning message, please edit the HikaSerial checkout class and replace
Code:
if(count($serials) == 1) { $serial = reset($serials); } else {
By
Code:
if(count($serials) == 1) { $serial = reset($serials); } else if(!empty($serials)) {
It will fix the warning display.

The, replace the line
Code:
if(empty($cart->coupon)) {
By
Code:
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.

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

11 years 3 weeks ago - 11 years 3 weeks ago #218053 by tellustek
Replied by tellustek on topic coupon error
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: 11 years 3 weeks ago by tellustek.

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

11 years 3 weeks ago #218056 by Jerome
Replied by Jerome on topic coupon error
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.

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

Time to create page: 0.060 seconds
Powered by Kunena Forum