[Skip to main content](#vessel-content)

#   Page gets submitted if user selects to use points

##

- **[otx](/forum/user/14566-otx "View otx's Profile")**
- [![otx's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/14566-otx "View otx's Profile") Topic Author
- [ Offline](/forum/user/14566-otx)

Less More

- Posts: 53
- Thank you received: 2
-
-

11 years 9 months ago [\#185923](#185923) by [otx](/forum/user/14566-otx "View otx's Profile")  *[Page gets submitted if user selects to use points](/forum/27-checkout/874136-page-gets-submitted-if-user-selects-to-use-points#185923 "-- url of the page with the problem -- :   www.vitaking.ro  -- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.35 -- Browser(s) name and version -- : Firefox 33  Hello,  Our checkout page gets submitted instantly if the user selects to use points as payment. If prior selects some shipping methods or payments methods, then acts normally, but if the first click goes on the points then the page gets submitted immediately. Please help, we allready upgraded our site and we have missed this bug on our test site.  Regards, Dezso")* was created by *[otx](/forum/user/14566-otx "View otx's Profile")*

-- url of the page with the problem -- : [ www.vitaking.ro](http://www.vitaking.ro)
-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.4.35
-- Browser(s) name and version -- : Firefox 33

Hello,

Our checkout page gets submitted instantly if the user selects to use points as payment. If prior selects some shipping methods or payments methods, then acts normally, but if the first click goes on the points then the page gets submitted immediately. Please help, we allready upgraded our site and we have missed this bug on our test site.

Regards,
Dezso

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NoZWNrb3V0Lzg3NDEzNi1wYWdlLWdldHMtc3VibWl0dGVkLWlmLXVzZXItc2VsZWN0cy10by11c2UtcG9pbnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

11 years 9 months ago [\#185926](#185926) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Page gets submitted if user selects to use points](/forum/27-checkout/874136-page-gets-submitted-if-user-selects-to-use-points#185926 "-- url of the page with the problem -- :   www.vitaking.ro  -- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.35 -- Browser(s) name and version -- : Firefox 33  Hello,  Our checkout page gets submitted instantly if the user selects to use points as payment. If prior selects some shipping methods or payments methods, then acts normally, but if the first click goes on the points then the page gets submitted immediately. Please help, we allready upgraded our site and we have missed this bug on our test site.  Regards, Dezso")*

Hi,

Can you please provide a screenshot of your checkout workflow configuration ?

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NoZWNrb3V0Lzg3NDEzNi1wYWdlLWdldHMtc3VibWl0dGVkLWlmLXVzZXItc2VsZWN0cy10by11c2UtcG9pbnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[otx](/forum/user/14566-otx "View otx's Profile")**
- [![otx's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/14566-otx "View otx's Profile") Topic Author
- [ Offline](/forum/user/14566-otx)

Less More

- Posts: 53
- Thank you received: 2
-
-

11 years 9 months ago [\#186004](#186004) by [otx](/forum/user/14566-otx "View otx's Profile")  Replied by *[otx](/forum/user/14566-otx "View otx's Profile")* on topic *[Page gets submitted if user selects to use points](/forum/27-checkout/874136-page-gets-submitted-if-user-selects-to-use-points#186004 "-- url of the page with the problem -- :   www.vitaking.ro  -- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.35 -- Browser(s) name and version -- : Firefox 33  Hello,  Our checkout page gets submitted instantly if the user selects to use points as payment. If prior selects some shipping methods or payments methods, then acts normally, but if the first click goes on the points then the page gets submitted immediately. Please help, we allready upgraded our site and we have missed this bug on our test site.  Regards, Dezso")*

Hi,

Here they are, thanks for your help.

[ ![checkout1.png](/forum/attachment/21578) ](/forum/attachment/21578 "checkout1.png")

[ ![checkout2.png](/forum/attachment/21579) ](/forum/attachment/21579 "checkout2.png")

Regards,
Dezso

- [ ![checkout1.png](/forum/attachment/21578) ](/forum/attachment/21578 "checkout1.png") [ ](/forum/attachment/21578?download=1 "checkout1.png")
- [ ![checkout2.png](/forum/attachment/21579) ](/forum/attachment/21579 "checkout2.png") [ ](/forum/attachment/21579?download=1 "checkout2.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NoZWNrb3V0Lzg3NDEzNi1wYWdlLWdldHMtc3VibWl0dGVkLWlmLXVzZXItc2VsZWN0cy10by11c2UtcG9pbnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14265
-
-

11 years 9 months ago [\#186052](#186052) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Page gets submitted if user selects to use points](/forum/27-checkout/874136-page-gets-submitted-if-user-selects-to-use-points#186052 "-- url of the page with the problem -- :   www.vitaking.ro  -- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.35 -- Browser(s) name and version -- : Firefox 33  Hello,  Our checkout page gets submitted instantly if the user selects to use points as payment. If prior selects some shipping methods or payments methods, then acts normally, but if the first click goes on the points then the page gets submitted immediately. Please help, we allready upgraded our site and we have missed this bug on our test site.  Regards, Dezso")*

Hi,

We're not able to reproduce the problem on our end.
Could you provide a backend access so that we could check the rest of your settings and a user account with points so that we could do some tests on your checkout ?
If so, you can provide that via our contact form with a link to this thread.
[ www.hikashop.com/support/contact-us.html](http://www.hikashop.com/support/contact-us.html)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NoZWNrb3V0Lzg3NDEzNi1wYWdlLWdldHMtc3VibWl0dGVkLWlmLXVzZXItc2VsZWN0cy10by11c2UtcG9pbnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[otx](/forum/user/14566-otx "View otx's Profile")**
- [![otx's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/14566-otx "View otx's Profile") Topic Author
- [ Offline](/forum/user/14566-otx)

Less More

- Posts: 53
- Thank you received: 2
-
-

11 years 9 months ago [\#186101](#186101) by [otx](/forum/user/14566-otx "View otx's Profile")  Replied by *[otx](/forum/user/14566-otx "View otx's Profile")* on topic *[Page gets submitted if user selects to use points](/forum/27-checkout/874136-page-gets-submitted-if-user-selects-to-use-points#186101 "-- url of the page with the problem -- :   www.vitaking.ro  -- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.35 -- Browser(s) name and version -- : Firefox 33  Hello,  Our checkout page gets submitted instantly if the user selects to use points as payment. If prior selects some shipping methods or payments methods, then acts normally, but if the first click goes on the points then the page gets submitted immediately. Please help, we allready upgraded our site and we have missed this bug on our test site.  Regards, Dezso")*

Hi,

I have sent the access details on the provided link.

Regards,
Dezso

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NoZWNrb3V0Lzg3NDEzNi1wYWdlLWdldHMtc3VibWl0dGVkLWlmLXVzZXItc2VsZWN0cy10by11c2UtcG9pbnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[otx](/forum/user/14566-otx "View otx's Profile")**
- [![otx's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/14566-otx "View otx's Profile") Topic Author
- [ Offline](/forum/user/14566-otx)

Less More

- Posts: 53
- Thank you received: 2
-
-

11 years 9 months ago [\#186343](#186343) by [otx](/forum/user/14566-otx "View otx's Profile")  Replied by *[otx](/forum/user/14566-otx "View otx's Profile")* on topic *[Page gets submitted if user selects to use points](/forum/27-checkout/874136-page-gets-submitted-if-user-selects-to-use-points#186343 "-- url of the page with the problem -- :   www.vitaking.ro  -- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.35 -- Browser(s) name and version -- : Firefox 33  Hello,  Our checkout page gets submitted instantly if the user selects to use points as payment. If prior selects some shipping methods or payments methods, then acts normally, but if the first click goes on the points then the page gets submitted immediately. Please help, we allready upgraded our site and we have missed this bug on our test site.  Regards, Dezso")*

Dear Nicolas,

Did you received the message with the access details?

Regards,
Dezso

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NoZWNrb3V0Lzg3NDEzNi1wYWdlLWdldHMtc3VibWl0dGVkLWlmLXVzZXItc2VsZWN0cy10by11c2UtcG9pbnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[otx](/forum/user/14566-otx "View otx's Profile")**
- [![otx's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/14566-otx "View otx's Profile") Topic Author
- [ Offline](/forum/user/14566-otx)

Less More

- Posts: 53
- Thank you received: 2
-
-

11 years 9 months ago [\#186394](#186394) by [otx](/forum/user/14566-otx "View otx's Profile")  Replied by *[otx](/forum/user/14566-otx "View otx's Profile")* on topic *[Page gets submitted if user selects to use points](/forum/27-checkout/874136-page-gets-submitted-if-user-selects-to-use-points#186394 "-- url of the page with the problem -- :   www.vitaking.ro  -- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.35 -- Browser(s) name and version -- : Firefox 33  Hello,  Our checkout page gets submitted instantly if the user selects to use points as payment. If prior selects some shipping methods or payments methods, then acts normally, but if the first click goes on the points then the page gets submitted immediately. Please help, we allready upgraded our site and we have missed this bug on our test site.  Regards, Dezso")*

Dear Nicolas,

Due to user complaints we had to swich off the reward points system on our site. We had several reports that as soon as they clicked to use points as payment, the page gets submitted without using the points.

Currently we have a development site, so if you are still interested in helping us, please ask for access details.

Regards,
Dezso Markon
vitaking.ro

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NoZWNrb3V0Lzg3NDEzNi1wYWdlLWdldHMtc3VibWl0dGVkLWlmLXVzZXItc2VsZWN0cy10by11c2UtcG9pbnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[otx](/forum/user/14566-otx "View otx's Profile")**
- [![otx's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/14566-otx "View otx's Profile") Topic Author
- [ Offline](/forum/user/14566-otx)

Less More

- Posts: 53
- Thank you received: 2
-
-

11 years 9 months ago -  11 years 9 months ago [\#186404](#186404) by [otx](/forum/user/14566-otx "View otx's Profile")  Replied by *[otx](/forum/user/14566-otx "View otx's Profile")* on topic *[Page gets submitted if user selects to use points](/forum/27-checkout/874136-page-gets-submitted-if-user-selects-to-use-points#186404 "-- url of the page with the problem -- :   www.vitaking.ro  -- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.35 -- Browser(s) name and version -- : Firefox 33  Hello,  Our checkout page gets submitted instantly if the user selects to use points as payment. If prior selects some shipping methods or payments methods, then acts normally, but if the first click goes on the points then the page gets submitted immediately. Please help, we allready upgraded our site and we have missed this bug on our test site.  Regards, Dezso")*

Dear Nicolas,

Regarding the reproduction of this bug, I think you have in your plugin configuration the option **Do not use point by default** on **No**. In this case works as expected. Switch to Yes and give it a try. Of course, you need the **Auto select default shipping and payment methods** on **yes**. In this case, on the checkout page if your first click goes on the Yes option to use your existing points, the page gets submitted.

Regards,
Dezso

Last edit: 11 years 9 months ago by [otx](/forum/user/14566-otx "View otx's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NoZWNrb3V0Lzg3NDEzNi1wYWdlLWdldHMtc3VibWl0dGVkLWlmLXVzZXItc2VsZWN0cy10by11c2UtcG9pbnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

11 years 9 months ago [\#186428](#186428) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Page gets submitted if user selects to use points](/forum/27-checkout/874136-page-gets-submitted-if-user-selects-to-use-points#186428 "-- url of the page with the problem -- :   www.vitaking.ro  -- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.35 -- Browser(s) name and version -- : Firefox 33  Hello,  Our checkout page gets submitted instantly if the user selects to use points as payment. If prior selects some shipping methods or payments methods, then acts normally, but if the first click goes on the points then the page gets submitted immediately. Please help, we allready upgraded our site and we have missed this bug on our test site.  Regards, Dezso")*

Hi,

Yes we received your credentials (but each time you reply to your thread is lost his place in our ticket system).
Thanks for the tip about the "do not use points by default - yes" ; I'll perform some tests with that and when I'll be able to reproduce your issue, I could provide a patch.

I saw that you made some replies that's why I prefer to notify you now ; but I will work on the patch later (it is in my queue).

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NoZWNrb3V0Lzg3NDEzNi1wYWdlLWdldHMtc3VibWl0dGVkLWlmLXVzZXItc2VsZWN0cy10by11c2UtcG9pbnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

11 years 9 months ago [\#186776](#186776) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Page gets submitted if user selects to use points](/forum/27-checkout/874136-page-gets-submitted-if-user-selects-to-use-points#186776 "-- url of the page with the problem -- :   www.vitaking.ro  -- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.35 -- Browser(s) name and version -- : Firefox 33  Hello,  Our checkout page gets submitted instantly if the user selects to use points as payment. If prior selects some shipping methods or payments methods, then acts normally, but if the first click goes on the points then the page gets submitted immediately. Please help, we allready upgraded our site and we have missed this bug on our test site.  Regards, Dezso")*

Hi,

Sorry for the late answer.
In the file "plugins/hikashop/userpoints/userpoints.php" you will find the function "onAfterCheckoutStep".
Please replace in that function Code:

if($controllerName != 'plg.shop.userpoints') return; $app = JFactory::getApplication();

By Code:

if($controllerName != 'plg.shop.userpoints') return; $default_no_virtual = (int)(@$this-&gt;plugin_options['checkout_step'] &amp;&amp; @$this-&gt;plugin_options['default_no_use']); $app = JFactory::getApplication();

Then replace 2 times (just below) Code:

$app-&gt;setUserState(HIKASHOP_COMPONENT.'.userpoints_no_virtual_coupon', 0);

By Code:

$app-&gt;setUserState(HIKASHOP_COMPONENT.'.userpoints_no_virtual_coupon', $default_no_virtual);

And also Code:

$no_virtual_coupon = (int)$app-&gt;getUserState(HIKASHOP_COMPONENT.'.userpoints_no_virtual_coupon', 0);

By Code:

$no_virtual_coupon = (int)$app-&gt;getUserState(HIKASHOP_COMPONENT.'.userpoints_no_virtual_coupon', $default_no_virtual);

So the plugin will have the correct information of the default state for the checkout selection.
Then when you will change the state of the radio, it won't submit the checkout but it will stay on the same step.

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NoZWNrb3V0Lzg3NDEzNi1wYWdlLWdldHMtc3VibWl0dGVkLWlmLXVzZXItc2VsZWN0cy10by11c2UtcG9pbnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[otx](/forum/user/14566-otx "View otx's Profile")**
- [![otx's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/14566-otx "View otx's Profile") Topic Author
- [ Offline](/forum/user/14566-otx)

Less More

- Posts: 53
- Thank you received: 2
-
-

11 years 9 months ago -  11 years 9 months ago [\#187416](#187416) by [otx](/forum/user/14566-otx "View otx's Profile")  Replied by *[otx](/forum/user/14566-otx "View otx's Profile")* on topic *[Page gets submitted if user selects to use points](/forum/27-checkout/874136-page-gets-submitted-if-user-selects-to-use-points#187416 "-- url of the page with the problem -- :   www.vitaking.ro  -- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.35 -- Browser(s) name and version -- : Firefox 33  Hello,  Our checkout page gets submitted instantly if the user selects to use points as payment. If prior selects some shipping methods or payments methods, then acts normally, but if the first click goes on the points then the page gets submitted immediately. Please help, we allready upgraded our site and we have missed this bug on our test site.  Regards, Dezso")*

Dear Jerome,

In the mentioned file I don't have the
Code:

if($controllerName != 'plg.shop.userpoints')

line. Also I don't have **$default\_no\_virtual** variable in the file. You are looking at the right version of this file?

This is how it looks the **onAfterCheckoutStep** function in 2.3.5 :
Code:

function onAfterCheckoutStep($controllerName, &amp;$go_back, $original_go_back, &amp;$controller) { if($controllerName == 'plg.shop.userpoints') { $app = JFactory::getApplication(); $this-&gt;_readOptions(); if(empty($this-&gt;plugin_options['checkout_step'])) { $app-&gt;setUserState(HIKASHOP_COMPONENT.'.userpoints_no_virtual_coupon', 0); return; } if(!empty($this-&gt;plugin_options['ask_no_coupon'])) { $no_virtual_coupon = (int)$app-&gt;getUserState(HIKASHOP_COMPONENT.'.userpoints_no_virtual_coupon', 0); $use_coupon_opt = JRequest::getString('userpoints_use_coupon', ''); if($use_coupon_opt !== '') { $no_coupon = 1 - (int)$use_coupon_opt; if($no_coupon != $no_virtual_coupon) { $go_back = true; $app-&gt;setUserState(HIKASHOP_COMPONENT.'.userpoints_no_virtual_coupon', $no_coupon); } } } else { $app-&gt;setUserState(HIKASHOP_COMPONENT.'.userpoints_no_virtual_coupon', 0); } } }

So what I have to change in this?

Regards,
Dezso

Last edit: 11 years 9 months ago by [otx](/forum/user/14566-otx "View otx's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NoZWNrb3V0Lzg3NDEzNi1wYWdlLWdldHMtc3VibWl0dGVkLWlmLXVzZXItc2VsZWN0cy10by11c2UtcG9pbnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

11 years 9 months ago [\#187457](#187457) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Page gets submitted if user selects to use points](/forum/27-checkout/874136-page-gets-submitted-if-user-selects-to-use-points#187457 "-- url of the page with the problem -- :   www.vitaking.ro  -- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.35 -- Browser(s) name and version -- : Firefox 33  Hello,  Our checkout page gets submitted instantly if the user selects to use points as payment. If prior selects some shipping methods or payments methods, then acts normally, but if the first click goes on the points then the page gets submitted immediately. Please help, we allready upgraded our site and we have missed this bug on our test site.  Regards, Dezso")*

Hi,

Oh yes, I've clean a little bit the code after the release...
So for the first replacement block ; the idea stays the same (add a new line)
But the easier will be to use the full new function: Code:

function onAfterCheckoutStep($controllerName, &amp;$go_back, $original_go_back, &amp;$controller) { if($controllerName != 'plg.shop.userpoints') return; $app = JFactory::getApplication(); $this-&gt;_readOptions(); if(empty($this-&gt;plugin_options['checkout_step'])) { $app-&gt;setUserState(HIKASHOP_COMPONENT.'.userpoints_no_virtual_coupon', 0); return; } $default_no_virtual = (int)(@$this-&gt;plugin_options['checkout_step'] &amp;&amp; @$this-&gt;plugin_options['default_no_use']); if(!empty($this-&gt;plugin_options['ask_no_coupon'])) { $no_virtual_coupon = (int)$app-&gt;getUserState(HIKASHOP_COMPONENT.'.userpoints_no_virtual_coupon', $default_no_virtual); $use_coupon_opt = JRequest::getString('userpoints_use_coupon', ''); if($use_coupon_opt !== '') { $no_coupon = 1 - (int)$use_coupon_opt; if($no_coupon != $no_virtual_coupon) { $go_back = true; $app-&gt;setUserState(HIKASHOP_COMPONENT.'.userpoints_no_virtual_coupon', $no_coupon); } } } else { $app-&gt;setUserState(HIKASHOP_COMPONENT.'.userpoints_no_virtual_coupon', $default_no_virtual); } }

Regards,

---

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

The following user(s) said Thank You: [otx](/forum/user/14566-otx "View otx's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NoZWNrb3V0Lzg3NDEzNi1wYWdlLWdldHMtc3VibWl0dGVkLWlmLXVzZXItc2VsZWN0cy10by11c2UtcG9pbnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[otx](/forum/user/14566-otx "View otx's Profile")**
- [![otx's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/14566-otx "View otx's Profile") Topic Author
- [ Offline](/forum/user/14566-otx)

Less More

- Posts: 53
- Thank you received: 2
-
-

11 years 9 months ago [\#187622](#187622) by [otx](/forum/user/14566-otx "View otx's Profile")  Replied by *[otx](/forum/user/14566-otx "View otx's Profile")* on topic *[Page gets submitted if user selects to use points](/forum/27-checkout/874136-page-gets-submitted-if-user-selects-to-use-points#187622 "-- url of the page with the problem -- :   www.vitaking.ro  -- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.35 -- Browser(s) name and version -- : Firefox 33  Hello,  Our checkout page gets submitted instantly if the user selects to use points as payment. If prior selects some shipping methods or payments methods, then acts normally, but if the first click goes on the points then the page gets submitted immediately. Please help, we allready upgraded our site and we have missed this bug on our test site.  Regards, Dezso")*

Hi,

Thank you for your help, works!

One more think, in order to get this payment method work perfectly. You have a bug in the mail notification preload files, around line 255, the line
Code:

if(!empty($additional-&gt;order_product_price) &#124;&#124; empty($additionaltionnal-&gt;order_product_options)) {

should be
Code:

if(!empty($additional-&gt;order_product_price) and empty($additionaltionnal-&gt;order_product_options)) {

in order to have the points in the notification mails displayed.

Thanks again, regards,
Dezso

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NoZWNrb3V0Lzg3NDEzNi1wYWdlLWdldHMtc3VibWl0dGVkLWlmLXVzZXItc2VsZWN0cy10by11c2UtcG9pbnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

11 years 9 months ago [\#187667](#187667) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Page gets submitted if user selects to use points](/forum/27-checkout/874136-page-gets-submitted-if-user-selects-to-use-points#187667 "-- url of the page with the problem -- :   www.vitaking.ro  -- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.35 -- Browser(s) name and version -- : Firefox 33  Hello,  Our checkout page gets submitted instantly if the user selects to use points as payment. If prior selects some shipping methods or payments methods, then acts normally, but if the first click goes on the points then the page gets submitted immediately. Please help, we allready upgraded our site and we have missed this bug on our test site.  Regards, Dezso")*

Hi,

No, the "if" check is good, but the value in the variable "order_product_price" should be converted.
You have to add this code just before the "if" Code:

if(!empty($additional-&gt;order_product_price)) $additional-&gt;order_product_price = (float)hikashop_toFloat($additional-&gt;order_product_price);

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NoZWNrb3V0Lzg3NDEzNi1wYWdlLWdldHMtc3VibWl0dGVkLWlmLXVzZXItc2VsZWN0cy10by11c2UtcG9pbnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.354 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
