Checkout payment selection
10 years 4 months ago - 10 years 4 months ago #241403
by thomasf
Checkout payment selection was created by thomasf
-- HikaShop version -- : 2.6.3
Dear team,
I would like to change the payment selection from radio button to drop down selection instead.
In which php file can I do the changes? Where there? and what is the code to change and insert? I hence need the code so that the view in the attachment shown changes to a drop down selection.
Thanks and regards
Thomas
Dear team,
I would like to change the payment selection from radio button to drop down selection instead.
In which php file can I do the changes? Where there? and what is the code to change and insert? I hence need the code so that the view in the attachment shown changes to a drop down selection.
Thanks and regards
Thomas
Last edit: 10 years 4 months ago by thomasf.
Please Log in or Create an account to join the conversation.
10 years 4 months ago #241418
by nicolas
Replied by nicolas on topic Checkout payment selection
Hi,
You can do that in the file "payment" of the view "checkout" that you can edit via the menu Display>Views. You'll have to basically replace all the code there to add a dropdown with a foreach on the payment methods array available in $this->methods
You can do that in the file "payment" of the view "checkout" that you can edit via the menu Display>Views. You'll have to basically replace all the code there to add a dropdown with a foreach on the payment methods array available in $this->methods
Please Log in or Create an account to join the conversation.
10 years 4 months ago #241444
by thomasf
Replied by thomasf on topic Checkout payment selection
Hi, Nicolas,
and what is that drop down code? and what is the word I need to replace? Can you just put one line as example? Thanks very much.
and what is that drop down code? and what is the word I need to replace? Can you just put one line as example? Thanks very much.
Please Log in or Create an account to join the conversation.
10 years 4 months ago #241454
by nicolas
Replied by nicolas on topic Checkout payment selection
Hi,
Please note that we provide user support on this forum, not custom coding services, and giving you one line of code is useless if you don't know what to do with it. The hints I gave you in my previous message should be enough for a developer to do it on its own. I'll make an exception because it's quite easy. It will be something like that:
Please note that we provide user support on this forum, not custom coding services, and giving you one line of code is useless if you don't know what to do with it. The hints I gave you in my previous message should be enough for a developer to do it on its own. I'll make an exception because it's quite easy. It will be something like that:
Code:
<select name="hikashop_payment">
<?php $done=false;
foreach($this->methods as $method){
$checked = '';
if(($this->payment_method==$method->payment_type && $this->payment_id==$method->payment_id)|| ($auto_select_default && empty($this->payment_id)&&!$done)){
$checked = 'checked="checked"';
$done = true;
}
echo '<option value="'.$method->payment_type.'_'.$method->payment_id.'" '.$checked.'>'.$method->payment_name.'</option>';
} ?>
</select>
The following user(s) said Thank You: thomasf
Please Log in or Create an account to join the conversation.
10 years 4 months ago #241517
by thomasf
Replied by thomasf on topic Checkout payment selection
Hi Nicolas, I highly appreciate this and understand your information. Regards
Thomas
Thomas
Please Log in or Create an account to join the conversation.
Time to create page: 0.224 seconds