if coupon invalid then wrong redirection

  • Posts: 154
  • Thank you received: 4
10 years 10 months ago #164246

-- 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: 10 years 10 months ago by olivnewton.

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

  • Posts: 26249
  • Thank you received: 4039
  • MODERATOR
10 years 10 months ago #164317

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.

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: 154
  • Thank you received: 4
10 years 10 months ago #164346

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.

  • Posts: 13201
  • Thank you received: 2322
10 years 10 months ago #164347

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.088 seconds
Powered by Kunena Forum