changing checkout payment options

  • Posts: 11
  • Thank you received: 0
10 years 1 month ago #174060

-- url of the page with the problem -- : www.dutchboxx.nl
-- HikaShop version -- : 2.3.3
-- Joomla version -- : 3.3.3

Hi,

We would like to change the method of selecting a payment options from
radio 'button' to a dropdown selection. Because we are using a number of 6 different payment plugins, the information shown on the checkout page is getting a bit crowded.

Is it possible to change the payment options from radio 'button' to a dropdown selection? (see images)

Thanks in advanced
regards Richard

Attachments:

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

  • Posts: 12953
  • Thank you received: 1778
10 years 1 month ago #174062

Hello Richard,
There is no option to do that so the only solution will be to directly use some code customization through the files of the "checkout" view which will require development skills.

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

  • Posts: 11
  • Thank you received: 0
10 years 1 month ago #174203

Hello Mohamed,

Thanks for the reply. I thought so
Does this mean making changes to the checkout/payment.php view? And if yes, can you give me a hint where to make any changes.

for instance in the source-part:

<div class="controls">
	<div class="hika-radio">
		<table class="hikashop_payment_methods_table table table-striped table-hover">
<?php
	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;
		}
		if($this->config->get('auto_submit_methods',1) && empty($method->ask_cc) && empty($method->custom_html) && empty($checked)){
			$checked.=' onclick="this.form.action=this.form.action+\'#hikashop_payment_methods\';this.form.submit(); return false;"';
		}
?>
			<tr>
				<td>
					<input class="hikashop_checkout_payment_radio" id="radio_<?php echo $method->payment_type.'_'.$method->payment_id;?>" type="radio" name="hikashop_payment" value="<?php echo $method->payment_type.'_'.$method->payment_id;?>" <?php echo $checked; ?> />
					<label class="btn btn-radio" for="radio_<?php echo $method->payment_type.'_'.$method->payment_id;?>"><?php echo $method->payment_name;?></label>
					<span class="hikashop_checkout_payment_cost">
<?php

Any instructions would be very welcom,

Regards, Richard

Last edit: 10 years 1 month ago by RWouters. Reason: Code add

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

  • Posts: 13201
  • Thank you received: 2322
10 years 1 month ago #174220

Hi,

You have to replace the <tr><td>... part into a select.
For the auto submit part, replace the "onclick" into a "onchange".

Some JS will potentially be required to change dynamically the id of the select into the correct one, the id of the selected payment method.

So PHP and some JS knwoledges are required.

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

Time to create page: 0.086 seconds
Powered by Kunena Forum