Skip to main content

if coupon invalid then wrong redirection

12 years 4 months ago - 12 years 4 months ago #164246 by olivnewton
-- url of the page with the problem -- : same as last posts (test server)
-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.0

dear team, i encountered the following strange behavior with "coupons":
- i am at "/checkout" or "/checkout/step-0" or "/checkout/task-step/step-0" (= which are basically all the same) and entering a wrong coupon code
- the page redirects to "/checkout/task-step/step-1" and the error message appears

this is strange because i am in page "/checkout/step-0" and wrong coupons redirect to "step-1"...
...but contents here after redirection are same as "step-0" ???
"step-1" is "login + address"...

is this a bug or intended to be so?

this behavior breaks my javascript because what i do is changing the TITLE at "/checkout" or "/checkout/step-0" or "/checkout/task-step/step-0" to something different, but after a wrong coupon code, the title cannot be changed because the url is wrongly not step-0 anymore...
Last edit: 12 years 4 months ago by olivnewton.

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

12 years 4 months ago #164317 by Jerome
Hi,

It's a normal situation.
There is no redirection, you just submit the form for the step 1 but because the form is not accepted, you're staying on the step 0.
But yes, the url saying that you're in the step 1.

You can have the same situation if you don't validate an element in a step (shipping, payment, terms, etc).

Regards,

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

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

12 years 4 months ago #164346 by olivnewton
i see... it would be right though to still show step-0 ...
so i have to think of another way to find out with javascript on which step the process is...

any idea?

i might try to read the class in div id="hikashop_chekout_page".
as i can see there is the correct step added, even if i use an invalid coupon code...
class="hikashop_checkout_page hikashop_checkout_page_step0"

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

12 years 4 months ago #164347 by Xavier
Hi,

Yes using the class name seems to be a good option.
You can parse the page and use the javascript match function in order to see if the correct class is present.

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

Time to create page: 0.054 seconds
Powered by Kunena Forum