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

#   Checkout with UserPoint

##

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

Less More

- Posts: 129
- Thank you received: 0
-
-

9 years 2 months ago [\#277107](#277107) by [nic7071](/forum/user/42433-nic7071 "View nic7071's Profile")  *[Checkout with UserPoint](/forum/27-checkout/891721-checkout-with-userpoint#277107 "hello, i'm using user point as a payment method. i have 2 options that user can click on &quot;yes&quot; and &quot;no&quot; to apply the discount of userpoint or not.  my problem is that the structure of this input radio buttons is some how complecated. i want to target the label of the input that is checked but as the input is inside the label i cannot do that. and also there is no other tag inside the label next to input it's just yes or no text.  i tried to add a &quot;&quot; tag aftre input inside label with java but after clicking on yes or no button the ajax refresh of hikashop make them removed.  i was wondering if you can tell me how can i access the structure of the yse or no button inside .hikashop&#95;userpoints&#95;status&#95;question div and move the input out off label and put it before label started. or even add a tag inside label next to input so the text of label or the label itself can be targeted when input is checked or not .  i've found this line of code that i think produce this structure but i cann't find out how to change it . Path: administrator/components/com&#95;hikashop/extensions/plg&#95;hikashop&#95;userpoints/userpoints&#95;checkout.php  i appreciate any help on this case Thanks")* was created by *[nic7071](/forum/user/42433-nic7071 "View nic7071's Profile")*

hello,
i'm using user point as a payment method.
i have 2 options that user can click on "yes" and "no" to apply the discount of userpoint or not.

my problem is that the structure of this input radio buttons is some how complecated.
i want to target the label of the input that is checked but as the input is inside the label i cannot do that.
and also there is no other tag inside the label next to input it's just yes or no text.

i tried to add a "&lt;span&gt;&lt;/span&gt;" tag aftre input inside label with java but after clicking on yes or no button the ajax refresh of hikashop make them removed.

i was wondering if you can tell me how can i access the structure of the yse or no button inside .hikashop_userpoints_status_question div and move the input out off label and put it before label started.
or even add a tag inside label next to input so the text of label or the label itself can be targeted when input is checked or not .

i've found this line of code that i think produce this structure but i cann't find out how to change it .
Path: administrator/components/com_hikashop/extensions/plg_hikashop_userpoints/userpoints_checkout.php Code:

if(!empty($this-&gt;legacy)) { echo JHTML::_('hikaselect.booleanlist', 'userpoints_use_coupon', 'onchange="this.form.submit();"', $use_coupon); } else { echo JHTML::_('hikaselect.booleanlist', 'userpoints_use_coupon', "onchange=\"if(window.checkout) return window.checkout.submitUserpoints(".$this-&gt;step.",".$this-&gt;module_position.");\"", $use_coupon); }

i appreciate any help on this case
Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg5MTcyMS1jaGVja291dC13aXRoLXVzZXJwb2ludD90bXBsPW1hcmtkb3du) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86586
- Thank you received: 14325
-
-

9 years 2 months ago [\#277113](#277113) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Checkout with UserPoint](/forum/27-checkout/891721-checkout-with-userpoint#277113 "hello, i'm using user point as a payment method. i have 2 options that user can click on &quot;yes&quot; and &quot;no&quot; to apply the discount of userpoint or not.  my problem is that the structure of this input radio buttons is some how complecated. i want to target the label of the input that is checked but as the input is inside the label i cannot do that. and also there is no other tag inside the label next to input it's just yes or no text.  i tried to add a &quot;&quot; tag aftre input inside label with java but after clicking on yes or no button the ajax refresh of hikashop make them removed.  i was wondering if you can tell me how can i access the structure of the yse or no button inside .hikashop&#95;userpoints&#95;status&#95;question div and move the input out off label and put it before label started. or even add a tag inside label next to input so the text of label or the label itself can be targeted when input is checked or not .  i've found this line of code that i think produce this structure but i cann't find out how to change it . Path: administrator/components/com&#95;hikashop/extensions/plg&#95;hikashop&#95;userpoints/userpoints&#95;checkout.php  i appreciate any help on this case Thanks")*

Hi,

There are several ways to go about it based on what you want to do.
- You could modify the administrator/components/com_hikashop/helpers/joomla30.php file where the HTML is generated.
- You might be able to do what you want with pure CSS [ stackoverflow.com/questions/26501827/wha...nput-is-inside-label](https://stackoverflow.com/questions/26501827/what-css-selector-to-modify-checkbox-label-when-input-is-inside-label)
- You could simply modify the plugins/hikashop/userpoints/userpoints_checkout.php file to add a str_replace to add your extra HTML to the HTML of the input.
-You could add your javascript after the line Code:

window.checkout.refreshUserpoints(&lt;?php echo (int)$this-&gt;step; ?&gt;, &lt;?php echo (int)$this-&gt;module_position; ?&gt;);

in that plugins/hikashop/userpoints/userpoints_checkout.php file so that it would run after each refresh.

Note that the file administrator/components/com_hikashop/extensions/plg_hikashop_userpoints/userpoints_checkout.php is not used by HikaShop. It's where the plugins/modules files are stored before the installation of these modules/plugins in their destination folders in /modules/ or /plugins/.

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

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

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

Less More

- Posts: 129
- Thank you received: 0
-
-

9 years 2 months ago [\#277205](#277205) by [nic7071](/forum/user/42433-nic7071 "View nic7071's Profile")  Replied by *[nic7071](/forum/user/42433-nic7071 "View nic7071's Profile")* on topic *[Checkout with UserPoint](/forum/27-checkout/891721-checkout-with-userpoint#277205 "hello, i'm using user point as a payment method. i have 2 options that user can click on &quot;yes&quot; and &quot;no&quot; to apply the discount of userpoint or not.  my problem is that the structure of this input radio buttons is some how complecated. i want to target the label of the input that is checked but as the input is inside the label i cannot do that. and also there is no other tag inside the label next to input it's just yes or no text.  i tried to add a &quot;&quot; tag aftre input inside label with java but after clicking on yes or no button the ajax refresh of hikashop make them removed.  i was wondering if you can tell me how can i access the structure of the yse or no button inside .hikashop&#95;userpoints&#95;status&#95;question div and move the input out off label and put it before label started. or even add a tag inside label next to input so the text of label or the label itself can be targeted when input is checked or not .  i've found this line of code that i think produce this structure but i cann't find out how to change it . Path: administrator/components/com&#95;hikashop/extensions/plg&#95;hikashop&#95;userpoints/userpoints&#95;checkout.php  i appreciate any help on this case Thanks")*

Hi,
I've used your advice on placing my code after the check out refresh line and every thing is running smoothly now.
also, i was wondering my changes in the admin path is not applying.
so thank you for your pieces of advice man!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg5MTcyMS1jaGVja291dC13aXRoLXVzZXJwb2ludD90bXBsPW1hcmtkb3du) 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.055 seconds

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