Bouton pour sélectionner méthode de paiement

  • Posts: 261
  • Thank you received: 4
9 years 10 months ago #187649

-- HikaShop version -- : 2.3.5

Bonjour,

J'ai un soucis dans le passage en caisse, la sélection du mode de paiement se fait par un bouton normal et non par un bouton radio.
D'ou cela peut-il provenir ? A priori cela ne vient pas du template car j'ai la même chose en le changeant pour protostar.


Merci d'avance

Attachments:
Last edit: 9 years 10 months ago by djiben.

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

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

Bonjour,

Cela est lié à Bootstrap, si vous avez bootstrap d'activé alors les boutons radio sont remplacés par de simple boutons.
Si vous ne désirez pas cet affichage, vous pouvez désactiver l'option bootstrap dans la configuration d'HikaShop, mais cela peut altérer d'autres affichages.

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

  • Posts: 261
  • Thank you received: 4
9 years 10 months ago #187725

Bonjour,
Merci pour la réponse mais j'ai besoin de réaliser un site responsive. Donc non je ne désactiverai pas le paramètre bootstrap.
Comment puis-je faire pour avoir des boutons radio ? Ca fonctionne bien pour le choix des caractéristiques .

Merci d'avance

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

  • Posts: 26159
  • Thank you received: 4028
  • MODERATOR
9 years 10 months ago #187732

Bonjour,

A ce moment là le mieux est d'éditer directement la vue afin de ne pas utiliser le design bootstrap pour cette partie du checkout (checkout | payment - ET - checkout | shipping)

Cordialement,


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.
The following user(s) said Thank You: djiben

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

  • Posts: 4
  • Thank you received: 0
9 years 9 months ago #190078

Bonjour

J'ai le même problème.
En laissant bootstrap coché, je ne vois même pas les bouttons de choix. A quoi ressemblent-ils ?
Comment désactivé le bootstrap dans les vue payment et shipping pour que les choix apparaîssent ?

Merci

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

  • Posts: 261
  • Thank you received: 4
9 years 9 months ago #190081

Bonjour,
voici le code modifié pour le fichier checkout / payment

<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.3.5
 * @author	hikashop.com
 * @copyright	(C) 2010-2015 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
if(!empty($this->orderInfos->full_total->prices[0]) && bccomp($this->orderInfos->full_total->prices[0]->price_value_with_tax,0,5)!=0){
	if(!empty($this->methods)){
?>
<div id="hikashop_payment_methods" class="hikashop_payment_methods">
	<fieldset>
		<legend><?php echo JText::_('HIKASHOP_PAYMENT_METHOD');?></legend>
<?php
		$done = false;
		$row_index=0;
		$auto_select_default = $this->config->get('auto_select_default',2);
		if($auto_select_default==1 && count($this->methods)>1) $auto_select_default=0;
		$odd = 0;

	
?>
		<table class="hikashop_payment_methods_table">
<?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 class="row<?php echo $odd; ?>">
				<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; ?> />
				</td>
				<td><label for="radio_<?php echo $method->payment_type.'_'.$method->payment_id;?>" style="cursor:pointer;">
					<span class="hikashop_checkout_payment_image">
<?php
				if(!empty($method->payment_images)){
					$images = explode(',',$method->payment_images);
					if(!empty($images)){
						foreach($images as $image){
							if(!empty($this->images_payment[$image])){
?>
						<img src="<?php echo HIKASHOP_IMAGES .'payment/'. $this->images_payment[$image];?>" alt=""/>
<?php
							}
						}
					}
				}
?>
					</span>
					</label>
				</td>
				<td><label for="radio_<?php echo $method->payment_type.'_'.$method->payment_id;?>" style="cursor:pointer;">
					<span class="hikashop_checkout_payment_name"><?php echo $method->payment_name;?></span></label>
					<span class="hikashop_checkout_payment_cost">
<?php
				if($method->payment_price != "0"){
					echo $this->currencyHelper->format($method->payment_price,$this->full_total->prices[0]->price_currency_id);
				}
				else
					echo JText::_('FREE_PAYMENT');
?>
					</span>
<?php
				if(!empty($method->payment_description)){
?>
					<br/>
					<div class="hikashop_checkout_payment_description"><?php echo $method->payment_description;?></div>
<?php
				}
?>
				</td>
			</tr>
			<tr class="hikashop_checkout_payment_ccinfo">
				<td colspan="3">
<?php
				$this->method =& $method;
				$this->setLayout('ccinfo');
				echo $this->loadTemplate();
?>
				</td>
			</tr>
<?php
				$row_index++;
				$odd = 1-$odd;
			}
?>
		</table>
<?php
		} else {
?>
<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 class="row<?php echo $odd; ?>">
				<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
	if($method->payment_price != "0")
		echo $this->currencyHelper->format($method->payment_price,$this->full_total->prices[0]->price_currency_id);
	else
		echo JText::_('FREE_PAYMENT');
?>
					</span>
					<span class="hikashop_checkout_payment_image">
<?php
				if(!empty($method->payment_images)){
					$images = explode(',',$method->payment_images);
					if(!empty($images)){
						foreach($images as $image){
							if(!empty($this->images_payment[$image])){
?>
						<img src="<?php echo HIKASHOP_IMAGES .'payment/'. $this->images_payment[$image];?>" alt=""/>
<?php
							}
						}
					}
				}
?>
					</span>
					<div class="hikashop_checkout_payment_description"><?php echo $method->payment_description;?></div>
					<div class="ccinfo">
<?php
		$this->method =& $method;
		$this->setLayout('ccinfo');
		echo $this->loadTemplate();
?>
					</div>
				</td>
			</tr>
<?php
		$odd = 1-$odd;
	}
?>
		</table>
	</div>
<script>
(function($){
	jQuery("#hikashop_payment_methods .hika-radio input[checked=checked]").each(function() {
		jQuery("label[for=" + jQuery(this).attr('id') + "]").addClass('active btn-primary');
	});
	jQuery("#hikashop_payment_methods .hika-radio input").change(function() {
		jQuery(this).parents('div.hika-radio').find('label.active').removeClass('active btn-primary');
		jQuery("label[for=" + jQuery(this).attr('id') + "]").addClass('active btn-primary');
	});
})(jQuery);
</script>
</div>
<?php
	}
?>
	</fieldset>
</div>
<?php
	}

D'après mes souvenirs j'ai juste supprimé la ligne : "if(!HIKASHOP_RESPONSIVE) {" et une balise } tout à la fin du fichier.

Teste et dis-moi ...

Bonne journée

The following user(s) said Thank You: pwauman

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

  • Posts: 4
  • Thank you received: 0
9 years 9 months ago #190087

Merci :cheer:
cela fonctionne nickel !

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

  • Posts: 261
  • Thank you received: 4
9 years 8 months ago #195086

Bonjour,
Je n'arrive pas à faire la même chose pour les modes de livraison. J'essaye de modifier le fichier checkout / shipping sans succès.
Un petit coup de main svp ??



Merci d'avance

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
9 years 8 months ago #195106

Bonjour,

Dans la vue "checkout / shipping" vous pouvez simplement remplacer tous les "!HIKASHOP_RESPONSIVE" par "HIKASHOP_RESPONSIVE".

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

Time to create page: 0.106 seconds
Powered by Kunena Forum