Advanced Search

Search Results (Searched for: jquery)

22 Jul 2022 03:31

onBeforeCartSave

Category: Checkout

Hi,

URL: eduquay.satumalaysiahosting.com/bundle-p...8-buku-buku-lembaran

I have created an 'Add All' button to add all the listing products to the cart, the method I'm using now is triggered the 'href' by JQuery, but it seems too heavy for the server.

So I'm now trying to develop a plugin to perform this action.
27 Jun 2022 21:50

Cpanel client : impossible de créer ou modifier des adresses

Category: Support en Français (French Support)

J'ai changé de template (Protostar, sans aucun overrides d'Hikashop), désactivé le SEF, désactivé tous les plugins tiers (sauf ceux d'Hikashop), j'utilise le fichier htaccess par défaut de Joomla. J'ai vu qu'un module utilisait encore mootools, alors je l'ai désactivé et j'ai aussi installé jQueryEasy pour m'assurer que rien d'inutile ne soit chargé.

A priori, absolument rien ne risque de modifier cette page. Mais le problème reste entier.

Je note que tous les liens d'édition des adresses sont du type "index.php?option=com_hikashop&ctrl=address&task=edit&cid=9961&address_type=shipping&tmpl=raw&Itemid=292", avec &tmpl=raw. Si on est censé avoir autre chose que ce tmpl=raw, alors quel type d'URL doit-on avoir ici et quel fichier permet de les générer ? À ce stade, je suis complètement démuni. Le site est dépouillé de tout sauf d'Hikashop et ça ne fonctionne pas.

Je note que l'édition des adresses passe par une vue "address / show.php", sauf, bizarrement, pour la 2e adresse du listing. Pas de vue "address / form.php" à l'horizon (sauf si je modifie l'URL en remplaçant tmpl=raw par tmpl=component).

Pour aller plus loin, j'ai fait une "clean install" de Joomla 3.10.10 + Hikashop 4.6.0 sous PHP 7.4.26 et absolument rien d'autre. J'ai testé les 2 templates par défaut de Joomla, en commençant par Protostar.

Lors de la création d'une première adresse en fontend, les indicateurs de champ requis ne s'affichent pas. La création se fait via la vue "address / show.php". Les liens d'édition des adresses sont de type "index.php?option=com_hikashop&ctrl=address&task=edit&cid=3&address_type=billing&tmpl=raw&Itemid=104"

L'édition se fait via la vue "address / show.php". Les champs requis ne sont pas signalés, ni aucune info en bas de page relative aux champs requis.

Les messages d'erreur sont dans une div du genre "<div id="hikashop_messages_" class="hikashop_messages hikashop_"><ul><li>Veuillez remplir le champ Prénom</li></ul></div>", au lieu de quelque chose comme "<div id="hikashop_messages_error" class="hikashop_messages hikashop_error"><ul><li>Veuillez remplir le champ Prénom</li></ul></div>" qui permettrait de mieux les mettre en exergue.

Tous les problèmes que je rencontre sur le site que je souhaite mettre à jour se rencontrent donc tous aussi sur une clean install (voir caputre jointe). Ça m'amène à penser qu'il y a un souci du côté d'Hikashop 4.6.0 pour le listing des adresses client.


Je n'ai pas ce type de problèmes avec Hikashop 4.4.2. Et en v4.6.0 il n'y a pas de problèmes lors de l'édition/création des adresses sur le checkout ou sur la page de création d'un compte client. je note cependant que le système de messages n'est pas homogène. Sur la page d'enregistrement, on a une pop-up d'alerte, puis le champ problématique mis en exergue. Sur le checkout, on a le nouveau système de messages d'Hikashop, qui fonctionne bien.

De mon côté, à ce stade, c'est l'impasse totale. Si vous n'avez pas de solution, je crois que je vais temporairement faire l'impasse sur ces problèmes d'édition des adresses, mais c'est quand même dommage. Je souhaite faire une mise à jour parce que j'ai besoin très bientôt des prix multiples avec dates de début/fin et Hikashop v4.4.2 a un bug qui me bloque (dès le deuxième prix ajouté, la date de fin des variantes n'est pas enregistrée en base de données et si je l'ajoute via phpMyAdmin, elle sera supprimée à la première modification).

Je vous invite à y regarder de plus près.

+++ +++ +++
Tout est OK sur le checkout au niveau de la création ou de l'édition d'adresses :
20 Jun 2022 11:43

Input fields don't listen to template style anymore

Category: Install & Update

Hi Nicholas,

Good point, I understand your story and I have passed on your suggestion 3 to Yootheme.

But what I still do not understand and forgive my lack of knowledge in this area. Is that Hikashop determined which classes are given, right? So if you haven't changed anything why is there a class form-control and form-select in Joomla 3 and not in joomla 4. Could there be a total other (template or javascript) issue that removed that classes?

----

I have thought of this as option 4, but I don't know what I might run into in the future.
// ADD CLASSES BOOTSTRAP 5 - For Hikashop form fields
jQuery(function (){    
  jQuery('.inputbox, .hkform-control, .hikashop_checkout_coupon_field').addClass('form-control');
});

jQuery(function (){    
  jQuery('.hikashop_field_dropdown').addClass('form-select');
});

// ADD CLASSES BOOTSTRAP 5 - For AcyMailing form fields

jQuery(function (){    
  jQuery('.checkbox').addClass('form-check-input');
});

jQuery(function (){    
  jQuery('.cell').addClass('form-control');
});
04 Jun 2022 09:07

Can Not Checkout on iOS - Safari / Chrome

Category: Checkout

Hi,

I don't have an iPhone / iPad on hand so I can't check the situation until at least Tuesday / Wednesday with one.
However, while looking at the checkout page with a Chrome browser on windows, I see several javascript errors linked to jquery on the page:
i.imgur.com/9iDCgYI.png
This seems to indicate a jquery conflict. It's actually amazing that the checkout is working with these javascript errors on other browsers.
So I would recommend first fixing these jquery errors. Hopefully, it might fix the problem on iPhones/iPads.
I'm not exactly sure why these errors popup. However, usually, jquery conflicts can be fixed by using Jquery Easy ( extensions.joomla.org/extension/jquery-easy/ ). So I would recommend installing and setting it up.
23 May 2022 17:12

Page blanche lors de paiements avec STRIPE Connect V3

Category: Install & Update

Bonjour Jerome,

Merci beaucoup pour ton retour

* Concernant les clés Stripe, j'ai révoqué la clé secrète et régénéré une nouvelle pour écarter tout problème
Les nouvelles clés ne changent pas mon problème de page blanche

* pour les messages d'erreurs sur la console de mon navigateur, j'ai trouvé ces messages :

- La ressource à l’adresse « www.flyingfood.fr/js.stripe.com/v3/ » a été bloquée en raison d’un type MIME (« text/html ») incorrect (X-Content-Type-Options: nosniff).
confirm

- La mise en page a été forcée avant le chargement complet de la page. Si les feuilles de style ne sont pas encore chargées, cela peut provoquer un flash de contenu non stylisé. jquery.min.js:2:87557

- La ressource à l’adresse « www.flyingfood.fr/js.stripe.com/v3/ » a été bloquée en raison d’un type MIME (« text/html ») incorrect (X-Content-Type-Options: nosniff).
confirm


- Échec du chargement pour l’élément <script> dont la source est « www.flyingfood.fr/js.stripe.com/v3/ ».

A priori, il y a bien un blocage du script de stripe v3, par contre là je ne suis pas capable de comprfende l'origine du problème

Merci d'avance pour votre aide
20 May 2022 18:52

Image Popups - Market Place

Category: Integrations

Hi,

I'm not saying you should change your template. Did you try asking your template provider what they recommend ?
Maybe they have an easy solution, like updating the template ?
What you can also try is to use JQuery Easy:
extensions.joomla.org/extension/jquery-easy/
It's an extension which usually allows you to circumvent these problems. However, since the jquery code is directly embedded in the js file of the template I'm not sure if it will work. That's why I recommended to first check with your template provider what they recommend.

Now we can refund you if no solution is provided by your template provider and JQuery Easy doesn't help or you don't want to try.
For that, please go through our contact form to request the refund including your order number:
www.hikashop.com/support/contact-us.html
18 May 2022 18:49

Image Popups - Market Place

Category: Integrations

Hi,

The issue comes from your template.
It includes jquery in its file community.advancn.org/templates/voyager/...ts/js/vendors.min.js which overrides the jquery of Joomla where the fluidbox module is attached to.
And thus, when the plugin tries to initilize fluidbox, it generates a javascript error because the jquery from the template doesn't have the fluidbox module attached to it.
The best would be for the template to not embed its own jquery and instead uses Joomla's. That would avoid such kind of problems.
But I'm not sure if that's possible.
I would recommend checking with your template's support on what can be done as I don't see what could be done in this plugin to avoid the problem.
28 Apr 2022 13:12

[j4] l'insertin de produit via le plugin fait planté mon site

Category: Support en Français (French Support)

Hi,

While the generic message is the same, the callstack actually points to a different problem.
And that's normal since the patch we added for the initial problem is already in HikaShop and you already have it.

The callstack points to the loading of the chosen library. So I suppose you have the "use chosen library" setting of the HikaShop configuration activated and that's what triggering the error as the content tag replacing plugin is trying to load chosen while the web asset manager is already locked.

Change the code:
JHtml::_('formbehavior.chosen', 'select');
to:
try {
						JHtml::_('formbehavior.chosen', 'select');
					} catch(Exception $e) {
						$doc = JFactory::getDocument();
						$doc->addStyleSheet(JURI::base(true).'/media/vendor/chosen/chosen.css');
						$doc->addScript(JURI::base(true).'/media/vendor/chosen/chosen.jquery.js');
					}
at the two places of the file administrator/components/com_hikashop/helpers/helper.php where you find them and it should solve the problem.

Please confirm the resolution of the problem so that we can include the patch on our end.
28 Feb 2022 12:54

is it possible to insert coupon in cart module?

Category: Discount & Coupon

nicolas wrote: Please understand however that the code I've given you so far is already beyond normal user support.

I understand that and thank a lot for your reply and i am very grateful to you. I have to thank you for your kindness .
i use this code and it work for me maybe have benefit for future users. Take a look at these codes if your time allows.
with this code coupon can add ajaxify or remove in cart module in every page except hikashop checkout page.
in view product>cart i put these code:

<?php
/**
 * @package	HikaShop for Joomla!
 * @version	4.4.0
 * @author	hikashop.com
 * @copyright	(C) 2010-2020 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
$tmpl = hikaInput::get()->getWord('tmpl', '');
$module_id = (int)$this->params->get('id', 0);

if(!in_array($tmpl, array('component', 'ajax', 'raw'))) {
	$events = ($this->cart_type == 'cart') ? '["cart.updated","checkout.cart.updated"]' : '"wishlist.updated"';
?>
<script type="text/javascript">
window.Oby.registerAjax(<?php echo $events; ?>, function(params) {
	var o = window.Oby, el = document.getElementById('hikashop_cart_<?php echo $module_id; ?>');
	if(!el) return;
	if(params && params.resp && (params.resp.ret === 0 || params.resp.module == <?php echo (int)$module_id; ?>)) return;
	if(params && params.type && params.type != '<?php echo $this->cart_type; ?>') return;
	o.addClass(el, "hikashop_checkout_loading");
	o.xRequest("<?php echo hikashop_completeLink('product&task=cart&module_id='.$module_id . '&module_type='.$this->cart_type, true, false, true); ?>", {update: el, mode:'POST', data:'return_url=<?php echo urlencode(base64_encode(hikashop_currentURL('return_url'))); ?>'}, function(xhr){
		o.removeClass(el, "hikashop_checkout_loading");
	});
});
</script>
<?php
} elseif(!headers_sent()){
	header('X-Robots-Tag: noindex');
}

$group = (int)$this->config->get('group_options', 0);
$small_cart = (int)$this->params->get('small_cart', 0);
$link_to_product = (int)$this->params->get('link_to_product_page', 1);
$spinner_css="";
if (!empty($small_cart)) $spinner_css="small_spinner small_cart";

if(empty($this->rows)) {
	$hidecart = (int)$this->params->get('hide_cart', 0);
	$desc = trim($this->params->get('msg'));
	if((empty($desc) && $desc != '0') || $hidecart == 0)
		$desc = ($this->cart_type == 'cart') ? JText::_('CART_EMPTY') : JText::_('WISHLIST_EMPTY');
	if($hidecart == 2)
		$desc = '';

	if(empty($desc) && $desc != '0' && $tmpl == 'component') {
		if(!headers_sent())
			header('Content-Type: text/css; charset=utf-8');
		exit;
	}

	if(!empty($desc))
		echo $this->notice_html;

	if(!in_array($tmpl, array('component', 'ajax', 'raw'))) {
?>
<div id="hikashop_cart_<?php echo $module_id; ?>" class="hikashop_cart">
<?php
	}
?>
	<div class="hikashop_checkout_loading_elem"></div>
	<div class="hikashop_checkout_loading_spinner <?php echo $spinner_css ?>"></div>
<?php
	if(!empty($desc))
		echo $desc;

	if(!in_array($tmpl, array('component', 'ajax', 'raw'))) {
?>
</div>
<div class="clear_both"></div>
<?php
	}

	return;
}


$css_button = $this->config->get('css_button', 'hikabtn');
$css_button_checkout = $this->config->get('css_button_checkout', 'hikashop_cart_proceed_to_checkout');

if($this->params->get('print_cart', 0)) {
	$print_button = $this->popup->display(
		'<i class="fas fa-print"></i>',
		'HIKA_PRINT', hikashop_completeLink('cart&task=printcart&cid='.$this->element->cart_id, true),
		'hikashop_print_popup', 760, 480, 'title="'.JText::_('HIKA_PRINT').'"', '', 'link'
	);
}
$this->setLayout('listing_price');
$this->params->set('show_quantity_field', 0);

if(!in_array($tmpl, array('component', 'ajax', 'raw'))) {
?>
<div id="hikashop_cart_<?php echo $module_id; ?>" class="hikashop_cart">
<?php
}
?>
	<div class="hikashop_checkout_loading_elem"></div>
	<div class="hikashop_checkout_loading_spinner <?php echo $spinner_css ?>"></div>
<?php

echo $this->notice_html;
if(!empty($this->element->messages)) {
	foreach($this->element->messages as $msg) {
		if(empty($msg['type']))
			$msg['type'] = 'success';
		hikashop_display($msg['msg'], $msg['type']);
	}
}
$text = '';
if(!empty($small_cart)) {
	$price_name  = '';
	if(!$this->params->get('show_shipping', 0) && isset($this->total->prices[0]->price_value_without_shipping)){
		$price_name = '_without_shipping';
	}
	if(!$this->params->get('show_coupon', 0) && isset($this->total->prices[0]->price_value_without_discount)){
		$price_name = '_without_discount';
	}
	$price = '';
	if($this->params->get('price_with_tax')){
		$var_name = 'price_value'.$price_name.'_with_tax';
		$price .= $this->currencyClass->format(@$this->total->prices[0]->$var_name, $this->total->prices[0]->price_currency_id);
	}
	if($this->params->get('price_with_tax')==2){
		$price .= JText::_('PRICE_BEFORE_TAX');
	}
	if($this->params->get('price_with_tax')==2||!$this->params->get('price_with_tax')){
		$var_name = 'price_value'.$price_name;
		$price .= $this->currencyClass->format(@$this->total->prices[0]->price_value, $this->total->prices[0]->price_currency_id);
	}
	if($this->params->get('price_with_tax')==2){
		$price .= JText::_('PRICE_AFTER_TAX');
	}
	if((int)$this->params->get('show_cart_quantity', 1)) {
		$qty = 0;
		foreach($this->element->cart_products as $i => $row) {
			if(empty($row->cart_product_quantity) && $this->element->cart_type == 'cart')
				continue;
			if($group && $row->cart_product_option_parent_id)
				continue;

			$qty += $row->cart_product_quantity;
		}

		if($this->params->get('show_price')){
			if($qty == 1 && JText::_('X_ITEM_FOR_X') != 'X_ITEM_FOR_X') {
				$text = JText::sprintf('X_ITEM_FOR_X', $qty, $price);
			} else {
				$text = JText::sprintf('X_ITEMS_FOR_X', $qty, $price);
			}
		}else{
			if($qty == 1)
				$text = JText::sprintf('X_ITEM', $qty);
			else
				$text = JText::sprintf('X_ITEMS', $qty);
		}
	} else {
		if($this->params->get('show_price'))
			$text = JText::sprintf('TOTAL_IN_CART_X', $price);
		else
			$text = JText::_('MINI_CART_PROCEED_TO_CHECKOUT');
	}
	unset($this->row);

	$extra_data = '';
	if($this->element->cart_type == 'cart') {
		$link = $this->url_checkout;
	} else {
		$link = hikashop_completeLink('cart&task=showcart&cart_id='.$this->element->cart_id.'&cart_type='.$this->element->cart_type . $this->cart_itemid);
	}
	if($small_cart == 2) {
		$extra_data .= ' onclick="if(window.hikashop.toggleOverlayBlock(\'hikashop_cart_dropdown_'.$module_id.'\')) return false;"';
	}elseif($small_cart == 3) {
		$extra_data .= ' ontouchend="window.hikashop.toggleOverlayBlock(\'hikashop_cart_dropdown_'.$module_id.'\', \'hover\'); return false;" onmouseover="window.hikashop.toggleOverlayBlock(\'hikashop_cart_dropdown_'.$module_id.'\', \'hover\'); return false;"';
	}
?>
	<a class="hikashop_small_cart_checkout_link" href="<?php echo $link; ?>"<?php echo $extra_data; ?>>
		<span class="hikashop_small_cart_total_title"><?php echo $text; ?></span>
	</a>
<?php
	if($this->element->cart_type == 'cart' && $small_cart == 1 && $this->params->get('print_cart', 0)) {
?>		<span class="hikashop_checkout_cart_print_link">
<?php		echo $print_button;
?>		</span>
<?php
	}

	if($this->element->cart_type == 'cart' && $small_cart == 1 && $this->params->get('show_cart_delete', 1)) {
		$delete = hikashop_completeLink('product&task=cleancart');
?>
	<a class="hikashop_small_cart_clean_link" title="<?php echo JText::_('EMPTY_THE_CART'); ?>" href="<?php echo $delete; ?>" onclick="window.location='<?php echo $delete. (strpos($delete, '?') ? '&amp;' : '?') .'return_url='; ?>'+window.btoa(window.location); return false;">
		<i class="fa fa-times-circle"></i>
	</a>
<?php
	}

	if($this->element->cart_type == 'cart' && $small_cart == 1 && $this->params->get('show_cart_proceed', 1)) {
?>
	<a class="<?php echo $css_button . ' ' . $css_button_checkout; ?>" href="<?php echo $this->url_checkout; ?>" onclick="if(this.disable) return false; this.disable = true;"><span><?php
		echo JText::_('PROCEED_TO_CHECKOUT');
	?></span></a>
<?php
	}

	if($small_cart == 1) {
?>
</div>
<div class="clear_both"></div>
<?php
		return;
	}

	$alignment = '';
	$v = (int)$this->params->get('dropdown_left', 0);
	if($v != 0) $alignment .= 'left:'.(-$v).'px;';
	$v = (int)$this->params->get('dropdown_right', 0);
	if($v != 0) $alignment .= 'right:'.(-$v).'px;';
?>
	<div class="hikashop_cart_dropdown_container">
	<div class="hikashop_cart_dropdown_content" id="hikashop_cart_dropdown_<?php echo $module_id; ?>" style="display:none;<?php echo $alignment; ?>">
<?php
}
$shows = array(
	'price' => (int)$this->params->get('show_price', 1),
	'coupon' => (int)$this->params->get('show_coupon', 0),
	'shipping' => (int)$this->params->get('show_shipping', 0),
	'payment' => (int)$this->params->get('show_payment', 0),
	'taxes' => (int)$this->params->get('show_taxes', 0),
);
$columns = array(
	'image' => (int)$this->params->get('image_in_cart', 0),
	'name' => (int)$this->params->get('show_cart_product_name', 1),
	'quantity' => (int)$this->params->get('show_cart_quantity', 1),
	'price' => (int)$shows['price'],
	'delete' => (int)$this->params->get('show_cart_delete', 1)
);
$nb_columns = 0;
foreach($columns as $c) {
	if(!empty($c))
		$nb_columns++;
}

?>
	<form action="<?php echo hikashop_completeLink('product&task=updatecart'.$this->url_itemid, false, true); ?>" method="post" name="hikashop_<?php echo $this->element->cart_type; ?>_form" onsubmit="if(window.hikashop) return window.hikashop.submitCartModule(this, 'hikashop_cart_<?php echo $module_id; ?>', '<?php echo $this->element->cart_type; ?>');">
		<table class="hikashop_cart" width="100%">
		<thead>
			<tr>
<?php if(!empty($columns['image'])) { ?>
				<th class="hikashop_cart_module_product_image_title hikashop_cart_title"><?php
					echo JText::_('CART_PRODUCT_IMAGE');
				?></th>
<?php } ?>
<?php if(!empty($columns['name'])) { ?>
				<th class="hikashop_cart_module_product_name_title hikashop_cart_title"><?php
					echo JText::_('CART_PRODUCT_NAME');
				?></th>
<?php } ?>
<?php if(!empty($columns['quantity'])) { ?>
				<th class="hikashop_cart_module_product_quantity_title hikashop_cart_title"><?php
					echo JText::_('CART_PRODUCT_QUANTITY');
				?></th>
<?php } ?>
<?php if(!empty($columns['price'])) { ?>
				<th class="hikashop_cart_module_product_price_title hikashop_cart_title"><?php
					echo JText::_('CART_PRODUCT_PRICE');
				?></th>
<?php } ?>
<?php if($nb_columns == 0) { ?>
				<th></th>
<?php }
if($this->params->get('print_cart', 0)) {
?>				<th class="hikashop_cart_module_product_image_title hikashop_cart_title">
					<span class="hikashop_checkout_cart_print_link" style="width: 16px; display: inline-block;">
<?php					echo $print_button;
?>					</span>
				</th>
<?php }  ?>
			</tr>
		</thead>
<?php
if(!empty($shows['price']) && $this->element->cart_type == 'cart') {
	$colspan = $nb_columns - (empty($columns['delete']) ? 1 : 2);
?>
		<tfoot>
<?php if(!empty($shows['coupon']) && !empty($this->element->coupon)) { ?>
			<tr>
<?php if($colspan > 0) { ?>
				<td class="hikashop_cart_module_coupon_title" colspan="<?php echo $colspan; ?>"><?php
					echo JText::_('HIKASHOP_COUPON');
				?></td>
<?php } ?>
				<td class="hikashop_cart_module_coupon_value"><?php
					if(!$this->params->get('price_with_tax'))
						echo $this->currencyClass->format(@$this->element->coupon->discount_value_without_tax * -1, @$this->element->coupon->discount_currency_id);
					else
						echo $this->currencyClass->format(@$this->element->coupon->discount_value * -1, @$this->element->coupon->discount_currency_id);
				?></td>
<?php if(!empty($columns['delete'])) { ?>
				<td></td>
<?php } ?>
			</tr>
<?php } ?>
<?php
if(!empty($shows['payment']) && !empty($this->element->payment) && $this->element->payment->payment_price !== null) { ?>
			<tr>
<?php if($colspan > 0) { ?>
				<td class="hikashop_cart_module_payment_title" colspan="<?php echo $colspan; ?>"><?php
					echo JText::_('HIKASHOP_PAYMENT');
				?></td>
<?php } ?>
				<td class="hikashop_cart_module_payment_value"><?php
					echo $this->currencyClass->format($this->payment_price, $this->total->prices[0]->price_currency_id);
				?></td>
<?php if(!empty($columns['delete'])) { ?>
				<td></td>
<?php } ?>
			</tr>
<?php } ?>
<?php if(!empty($shows['shipping']) && !empty($this->element->shipping) && $this->shipping_price !== null) { ?>
			<tr>
<?php if($colspan > 0) { ?>
				<td class="hikashop_cart_module_shipping_title" colspan="<?php echo $colspan; ?>"><?php
					echo JText::_('HIKASHOP_SHIPPING');
				?></td>
<?php } ?>
				<td class="hikashop_cart_module_shipping_value"><?php
					echo $this->currencyClass->format($this->shipping_price, $this->total->prices[0]->price_currency_id);
				?></td>
<?php if(!empty($columns['delete'])) { ?>
				<td></td>
<?php } ?>
			</tr>
<?php } ?>
<?php
if(!empty($shows['taxes']) && isset($this->total->prices[0])) {
	if ($this->config->get('detailed_tax_display') && !empty($this->total->prices[0]->taxes)) {
		foreach($this->displayingPrices->taxes as $taxname => $taxdata){
?>
			<tr>
<?php
			if($colspan > 0) { ?>
				<td class="hikashop_cart_module_tax_title" colspan="<?php echo $colspan; ?>"><?php
					echo hikashop_translate($taxname);
				?></td>
<?php 		} ?>
				<td class="hikashop_cart_module_tax_value"><?php
					echo $this->currencyClass->format($taxdata->tax_amount, $this->displayingPrices->price_currency_id);
				?></td>
<?php 		if(!empty($columns['delete'])) { ?>
				<td></td>
<?php 		} ?>
			</tr>
<?php 	}
	}else{
?>
			<tr>
<?php
			if($colspan > 0) { ?>
				<td class="hikashop_cart_module_tax_title" colspan="<?php echo $colspan; ?>"><?php
					echo JText::_('TAXES');
				?></td>
<?php 		} ?>
				<td class="hikashop_cart_module_tax_value"><?php
					$taxes = round($this->displayingPrices->total->price_value_with_tax - $this->displayingPrices->total->price_value, $this->currencyClass->getRounding($this->displayingPrices->price_currency_id));
					echo $this->currencyClass->format($taxes, $this->displayingPrices->price_currency_id);
				?></td>
<?php 		if(!empty($columns['delete'])) { ?>
				<td></td>
<?php 		} ?>
			</tr>
<?php
	}
}
?>
			<tr>
<?php if($colspan > 0) { ?>
				<td class="hikashop_cart_module_product_total_title" colspan="<?php echo $colspan; ?>"><?php
					echo JText::_('HIKASHOP_TOTAL');
				?></td>
<?php } ?>
				<td class="hikashop_cart_module_product_total_value"><?php
					if($this->params->get('price_with_tax', 3) == 3) {
						$this->params->set('price_with_tax', (int)$this->config->get('price_with_tax'));
					}
					$total_price = '';
					if($this->params->get('price_with_tax')){
						$total_price .= $this->currencyClass->format($this->displayingPrices->total->price_value_with_tax, $this->displayingPrices->price_currency_id);
					}
					if($this->params->get('price_with_tax')==2){
						$total_price .= JText::_('PRICE_BEFORE_TAX');
					}
					if($this->params->get('price_with_tax')==2||!$this->params->get('price_with_tax')){
						$total_price .= $this->currencyClass->format($this->displayingPrices->total->price_value, $this->displayingPrices->price_currency_id);
					}
					if($this->params->get('price_with_tax')==2){
						$total_price .= JText::_('PRICE_AFTER_TAX');
					}
					?>
					<span class="hikashop_product_price_full">
						<span class="hikashop_product_price hikashop_product_price_0">
							<?php echo $total_price; ?>
						</span>
					</span>
				</td>
<?php //exit; ?>
<?php if(!empty($columns['delete'])) { ?>
				<td></td>
<?php } ?>
			</tr>
		</tfoot>
<?php } ?>
		<tbody>
<?php
$group = $this->config->get('group_options', 0);
$width = (int)$this->config->get('cart_thumbnail_x', 50);
$height = (int)$this->config->get('cart_thumbnail_y', 50);
$image_options = array(
	'default' => true,
	'forcesize' => $this->config->get('image_force_size', true),
	'scale' => $this->config->get('image_scale_mode','inside')
);

$k = 0;
foreach($this->element->products as $k => $product) {
	if($group && !empty($product->cart_product_option_parent_id))
		continue;
	if(empty($product->cart_product_quantity) || substr($k,0,1) === 'p')
		continue;

	$cart_product = $this->element->cart_products[$k];
?>
			<tr class="row<?php echo $k; ?>">
<?php
	if(!empty($columns['image'])) {
?>
				<td class="hikashop_cart_module_product_image hikashop_cart_value" style="vertical-align:middle !important;text-align:center;"><?php
		$img = $this->imageHelper->getThumbnail(@$product->images[0]->file_path, array('width' => $width, 'height' => $height), $image_options);
		if($img->success) {
			$attributes = '';
			if($img->external)
				$attributes = ' width="'.$img->req_width.'" height="'.$img->req_height.'"';
			?><img class="hikashop_product_cart_image" title="<?php echo $this->escape(@$product->images[0]->file_description); ?>" alt="<?php echo $this->escape(@$product->images[0]->file_name); ?>" src="<?php echo $img->url; ?>" <?php echo $attributes; ?>/><?php
		}
				?></td>
<?php
	}
?>
<?php
	if(!empty($columns['name'])) {
?>
				<td class="hikashop_cart_module_product_name_value hikashop_cart_value">
<?php
		if($link_to_product == 1) {
			?><a href="<?php echo hikashop_contentLink('product&task=show&cid='.$product->product_id.'&name='.$product->alias.$this->url_itemid, $product);?>"><?php
		}
?>
<?php
		echo $product->product_name;
?>
<?php
		if ($this->config->get('show_code')) {
			?><span class="hikashop_product_code_cart"><?php echo $product->product_code; ?></span><?php
		}
?>
<?php
		if($link_to_product == 1) {
			?></a><?php
		}
?>
<?php
		$html = '';
		if(hikashop_level(2) && !empty($this->itemFields)) {
			foreach($this->itemFields as $field) {
				$namekey = $field->field_namekey;
				if(empty($cart_product->$namekey) || !strlen($cart_product->$namekey))
					continue;
				$html .= '<p class="hikashop_cart_item_'.$namekey.'">' .
					$this->fieldsClass->getFieldName($field) . ': ' .
					$this->fieldsClass->show($field, $cart_product->$namekey) .
					'</p>';
			}
		}
		if($group) {
			foreach($this->element->products as $j => $optionElement) {
				if($optionElement->cart_product_option_parent_id != $product->cart_product_id)
					continue;
				if(!empty($optionElement->variant_name)) {
					$text = $optionElement->variant_name;
				} elseif(empty($optionElement->characteristics_text)){
					$text = $optionElement->product_name;
				} else {
					$text = $optionElement->characteristics_text;
				}
				$html .= '<p class="hikashop_cart_option_name">'. $text . '</p>';
			}
		}
		if(!empty($html)) {
?>
					<div class="hikashop_cart_product_custom_item_fields"><?php
						echo $html;
					?></div>
<?php
		}
?>
				</td>
<?php
	}
?>
<?php
	if(!empty($columns['quantity'])) {
?>
				<td class="hikashop_cart_module_product_quantity_value hikashop_cart_value"><?php
		$this->row =& $product;
		$this->quantityLayout = $this->cartHelper->getProductQuantityLayout($this->row);
		if(!in_array($this->quantityLayout, array('show_simple','show_select','show_select_price','show_none')))
			$this->quantityLayout = 'show_simple';
		echo $this->loadHkLayout('quantity', array(
			'quantity_fieldname' => 'item['.$product->cart_product_id.'][cart_product_quantity]',
			'onchange_script' => 'window.hikashop.checkQuantity(this); if(this.value == '.(int)$product->cart_product_quantity.'){ return; } if(this.form.onsubmit && !this.form.onsubmit()) return; this.form.submit();',
		));
				?></td>
<?php
	}
?>
<?php
	if(!empty($columns['price'])) {
		if($group) {
			foreach($this->element->products as $j => $optionElement) {
				if($optionElement->cart_product_option_parent_id != $product->cart_product_id)
					continue;
				if(empty($optionElement->prices[0]))
					continue;
				if(!isset($product->prices[0])) {
					$product->prices[0] = new stdClass();
					$product->prices[0]->price_value = 0;
					$product->prices[0]->price_value_with_tax = 0;
					$product->prices[0]->price_currency_id = hikashop_getCurrency();
				}
				foreach(get_object_vars($product->prices[0]) as $key => $value) {
					if(strpos($key, 'price_value') === false)
						continue;
					if(is_object($value)) {
						foreach(get_object_vars($value) as $key2 => $var2) {
							$product->prices[0]->$key->$key2 += @$optionElement->prices[0]->$key->$key2;
						}
					} else {
						$product->prices[0]->$key += @$optionElement->prices[0]->$key;
					}
				}
			}
		}
?>
				<td class="hikashop_cart_module_product_price_value hikashop_cart_value"><?php
		$this->row =& $product;
		$this->unit = false;
		$this->cart_product_price = true;

		$price_with_tax_option = $this->params->get('price_with_tax');
		if(!empty($shows['taxes']) && $this->params->get('price_with_tax') == 1)
			$this->params->set('price_with_tax',0);

		if($this->params->get('show_discount', 3) == 3 && isset($this->default_params['show_discount'])) {
			$this->params->set('show_discount', (int)$this->default_params['show_discount']);
		}

		echo $this->loadTemplate();

		if(!empty($shows['taxes']) && $price_with_tax_option == 1)
			$this->params->set('price_with_tax',$price_with_tax_option);
				?></td>
<?php } ?>
<?php
	if(!empty($columns['delete'])) {
		$delete_url = hikashop_completeLink('product&task=updatecart&cart_id='.(int)$this->element->cart_id.'&cart_product_id='.(int)$product->cart_product_id.'&quantity=0');
		$delete_url .= ((strpos($delete_url, '?') === false) ? '?' : '&') . 'return_url='.urlencode(base64_encode(urldecode($this->params->get('url'))));
?>
				<td class="hikashop_cart_module_product_delete_value hikashop_cart_value">
					<a href="<?php echo $delete_url; ?>" data-cart-id="<?php echo (int)$this->element->cart_id; ?>" data-cart-type="<?php echo $this->escape($this->element->cart_type); ?>" data-cart-product-id="<?php echo (int)$product->cart_product_id; ?>" onclick="if(window.hikashop) { return window.hikashop.deleteFromCart(this, null, 'hikashop_cart_<?php echo $module_id; ?>'); }" title="<?php echo JText::_('HIKA_DELETE'); ?>">
						<i class="fa fa-times-circle"></i>
					</a>
				</td>
<?php
	}
?>
<?php
	if($nb_columns == 0) {
?>
				<td></td>
<?php
	}
?>
			</tr>
<?php
	$k = 1 - $k;
}
?>
		</tbody>
		</table>
		<input type="hidden" name="option" value="<?php echo HIKASHOP_COMPONENT; ?>"/>
		<input type="hidden" name="ctrl" value="product"/>
		<input type="hidden" name="task" value="updatecart"/>
		<input type="hidden" name="cart_type" value="<?php echo $this->cart_type; ?>"/>
		<input type="hidden" name="url" value="<?php echo $this->escape($this->params->get('url')); ?>"/>
<?php
if($this->params->get('show_cart_quantity', 1)) {
?>
		<noscript>
			<input type="submit" class="<?php echo $css_button; ?>" name="refresh" value="<?php echo JText::_('REFRESH_CART');?>"/>
		</noscript>
<?php
}
?>
      
      
      
      
      
      

 
      
      
      
      
	</form>
      
      
      
      
      
      
      
      
<?php
$cartClass= hikashop_get('class.cart');
$cart = $cartClass->getFullCart();
if(empty($cart->coupon)) {
global $Itemid;
$url_itemid= '';
if(!empty($Itemid)) $url_itemid = '&Itemid='.$Itemid;
 ?>

<?php } ?>
      
      
      
       
      
      <?php
global $Itemid;
$url_itemid= '';
if(!empty($Itemid)) $url_itemid = '&Itemid='.$Itemid;
 ?>

        <?php

        require_once JPATH_ADMINISTRATOR . '/components/com_hikashop/helpers/checkout.php';
        $checkoutHelper = hikashopCheckoutHelper::get();
        $workflow = $checkoutHelper->checkout_workflow;

        foreach ($workflow['steps'] as $index1 => $stp) {

            foreach ($stp['content'] as $index2 => $pos) {

                if ($pos['task'] == 'coupon') {
                    $step = $index1;
                    $position = $index2;
                    break 2;
                }
            }
        }

        $hikashop_checkout_coupon= 'hikashop_checkout_coupon_'. ($step + 1). '_'. ($position);
        $hikashop_checkout_coupon_input= 'hikashop_checkout_coupon_input_'. ($step + 1). '_'. ($position);

        $app = jfactory::getapplication();
        $document = jfactory::getdocument();
        $input = $app->input;
        $view = $input->get('view');
        if (!in_array($view, ['checkout'])) {
            $cartClass = hikashop_get('class.cart');
            $cart = $cartClass->getFullCart();
            $document->addScript(juri::root() . 'media/com_hikashop/js/checkout.js')
            ?>

            <script>
                jQuery(document).ready(function ($) {

                    window.checkout.token = Joomla.getOptions('csrf.token');
                    window.checkout.urls.show = "/customer-order/checkout/showblock/tmpl-raw";
                    window.checkout.urls.submit = "/customer-order/checkout/submitblock/tmpl-raw";
                    window.checkout.urls.submitstep = "/customer-order/checkout/submitstep/tmpl-raw";

                    if (!window.checkout) window.checkout = {};
                    window.Oby.registerAjax(['checkout.coupon.updated', 'cart.updated'], function (params) {
                        if (params && (params.cart_empty || (params.resp && params.resp.empty))) return;
                        window.checkout.refreshCoupon(1, 2);
                    });
                    window.checkout.refreshCoupon = function (step, id) {
                        return window.checkout.refreshBlock('coupon', step, id);
                    };
                    window.checkout.submitCoupon = function (step, id) {
                        var el = document.getElementById('hikashop_checkout_coupon_input_' + step + '_' + id);
                        if (!el)
                            return false;
                        if (el.value == '') {
                            window.Oby.addClass(el, 'hikashop_red_border');
                            return false;
                        }
                        return window.checkout.submitBlock('coupon', step, id);
                    };
                    window.checkout.removeCoupon = function (step, id) {
                        window.checkout.submitBlock('coupon', step, id, {'checkout[removecoupon]': 1});
                        return false;
                    };
                })
            </script>

        <?php if (!empty($cart->coupon)): ?>
            <style>
                .hikashop_checkout_coupon .fa-trash {
                    color: #439a86 !important;
                }

                .hikashop_checkout_coupon a {
                    color: #000 !important;
                }
            </style>
            <div id="<?= $hikashop_checkout_coupon;?>" data-checkout-step="<?= ($step+1)?>" data-checkout-pos="<?= ($position)?>"
                 class="hikashop_checkout_coupon">
                <div class="hikashop_checkout_loading_elem"></div>
                <div class="hikashop_checkout_loading_spinner"></div>
                <a href="#removeCoupon"
                   onclick="return window.checkout.removeCoupon(<?= ($step + 1) ?>,<?= ($position) ?>);"
                   title="حذف کوپن">
                    حذف کوپن
                    <i class="fas fa-trash"></i>
                </a>
            </div>

        <?php else: ?>

            <div id="<?= $hikashop_checkout_coupon;?>" data-checkout-step="<?= ($step + 1) ?>"
                 data-checkout-pos="<?= ($position) ?>" class="hikashop_checkout_coupon">
                <div class="hikashop_checkout_loading_elem"></div>
                <div class="hikashop_checkout_loading_spinner"></div>

                <label for="<?= $hikashop_checkout_coupon_input;?>">کوپن خود را وارد کنيد</label>
                <div class="input-append">
                    <input class="hikashop_checkout_coupon_field" id="<?= $hikashop_checkout_coupon_input;?>" type="text"
                           name="checkout[coupon]" value="">
                    <button type="submit"
                            onclick="return window.checkout.submitCoupon(<?= ($step + 1) ?>,<?= ($position) ?>);"
                            id="farhad" class="hikabtn hikabtn-primary">اضافه کردن
                    </button>
                </div>
            </div>
        <?php endif; ?>

            <?php
        }
        ?>

      
<?php
if($this->element->cart_type == 'cart' && $this->params->get('show_cart_proceed', 1)) {
?>
	<a class="<?php echo $css_button . ' ' . $css_button_checkout; ?>" href="<?php echo $this->url_checkout; ?>" onclick="if(this.disable) return false; this.disable = true;"><span><?php
		echo JText::_('PROCEED_TO_CHECKOUT');
	?></span></a>
    <a href="<?php echo hikashop_completeLink('checkout&task=confirm'.$url_itemid); ?>" class="hikabtn hikabtn-success hikabtn_checkout_next"><?= JText::_('CHECKOUT_BUTTON_FINISH');?></a>
<?php
}

if(!empty($this->extraData->bottom)) { echo implode("\r\n", $this->extraData->bottom); }

if(in_array($small_cart, array(2, 3))) {
?>
	</div>
	</div>
<?php
}

if(!in_array($tmpl, array('component', 'ajax', 'raw'))) {
?>
</div>
<div class="clear_both"></div>
<?php
}
17 Feb 2022 12:22

How to create a custom validation for custom fields

Category: Install & Update

Hi,

That's indeed good practice.

If the HikaShop cart notification plugin is activated and configured to display the notification box upon add to cart, then you can use such code:
jQuery.notify({title:'My title',text:'My text'},{style:"metro-lite",className:'warning'});

If you have a DOM element on which to attach the notification box, you can do it like that:
jQuery(el).notify({title:'My title',text:'My text'},{style:"metro-lite",className:'warning',arrowShow:true});
16 Dec 2021 07:06

Problème avec le plugin OSMap sous Joomla 4

Category: Support en Français (French Support)

-- HikaShop version -- : 4.4.4
-- Joomla version -- : 4.0.5
-- PHP version -- : 7.4

Bonjour,

Je continue mes tests sous J4 et je viens de tomber sur un dysfonctionnement.
OSMap ne génère pas de sitemap Hikashop sous J4.
J'ai fait un test avec un menu pointant sur des articles Joomla pour voir si le problème ne vient pas de OSMap -> pas de soucis



Lorsque je veux générer le sitemap pour Hikashop, j'obtiens une page avec un spinner qui tourne sans fin.



Dans la console de Chrome, j'ai relevé 2 erreurs :
jquery.min.js?3.6.0:2 GET v2.aurigines.com/index.php?option=com_os...&tmpl=component&id=3 500

0
Class 'JArrayHelper' not found
Une erreur est survenue pendant l'exécution de la requête.

Le plugin est parfaitement fonctionnel sous J3, produits et images.

Merci d'avance
Cordialement
Patrick
24 Nov 2021 03:52

Swipebox lightbox plugin on Joomla 4 gives overlay without images

Category: Product & Category Display

Hello,

Unfortunately, it looks like your issue is related to jQuery version.
CF : github.com/brutaldesign/swipebox/pull/298

We updated the imagepopup-swipebox package with the latest version of swipebox which fix the jQuery 3.5.x (and newer) conflict.

Regards,
17 Nov 2021 17:59

Mobile menu not working on Hikashop category pages

Category: Product & Category Display

Hi,

So I've found what is the issue with the links when jquery mobile is activated.
It's because jquery mobile will catch all the clicks as it tries to preload the HTML of the links and then feed the browser the new content to make the pages load faster.
This doesn't work because there is a javascript error linked to a conflict between jquery mobile and the Advanced date picker system (which also relies on jquery), and thus when you click on a link you don't get anything beside the loading gif.
So using jquery mobile is not a solution.
Besides, the menu might work with it just because of the javascript error during the loading of the page which stops the rest of the javascript code after it from being run and so even if that conflict was removed, it might just lead to the menu issue even with jquery mobile activated (most likely result in my opinion).
The best would be to debug the javascript of the mobile menu mechanism to see what's going on when a link there is clicked.
However, even with JCH Optimize disabled, the javascript of the template is still compressed, making it unreadable.
The javascript of your template is also not my expertise.
The best would be for the template provider to look into it as I don't know what to do and I might just spend days on it without any result.
17 Nov 2021 10:32

Mobile menu not working on Hikashop category pages

Category: Product & Category Display

Hi Nicolas,

Thanks for the trouble!
I also don't get why using jquery is working, but it does solve the menu issue.
This message contains confidential information


I have disabled the fixed header in the template for now because it's causing the visitors to leave. So if you want to test, you would need to turn that on in the template settings
This message contains confidential information
17 Nov 2021 10:06

Mobile menu not working on Hikashop category pages

Category: Product & Category Display

Hi,

What I can see is that you only have one jquery loaded in your page headers, joomla's.
So I don't see why using jquery easy would help nor change anything to the problem.
And as you say, I don't see any error in the console.
And yes, the links to the product details page are just normal HTML "a" tags (normal URLs), without any script on them, so I don't see why turning on or off jquery easy would change anything for them.
The only reasons I can see are:
- that some other transparent HTML element goes over the main area where the links are and thus, when you think you click on the links, you actually click on that transparent HTML element and not the URL, and that's why nothing happens. I might be able to look into it with browserstack.com but I need to be able to see the problem with jquery easy activated. Maybe you could provide a backend access so that I could activate it while doing my tests without breaking the product details page links for several hours?
- some javascript code catches the click and cancels it for some reason. In that case, it will be hard to debug as it could come from anything.
I would however recommend you report the issue with your template / menu provider as the code to change is probably in the javascript code there.
16 Nov 2021 20:35

Mobile menu not working on Hikashop category pages

Category: Product & Category Display

I have indeed tried that, but I just don't see any javascript errors even without JCH on. I have turned it off for these pages, maybe you can see what is going on. Any idea as to what to do with jquery easy blocking the product urls when clicking on a product? I don't see any script loading when you click on a product (correct?) so I don't get the gif loading image and not going to the product page.
16 Nov 2021 19:32

Mobile menu not working on Hikashop category pages

Category: Product & Category Display

Hi,

I did some tests on Safari with browserstack.com and I did see that sometimes, when I click on the menu icon to bring it out, it doesn't open and I have to click several times.
However, the browser's javascript console doesn't display any error when that happens.
I also can't check the javascript code on the page since you're using JCH Optimize and all the JS is compressed together, making it unreadable.
I can't say that it is or it is not a HikaShop issue at the time. However, seeing that the issue is in the menu system, it doesn't seem like it.
It's probably more of a javascript library conflict and using jquery easy is a good idea. But you need to make sure you deactivate JCH Optimize when you do your tests and configure jquery easy since otherwise, JCH Optimize will mess up the tests as long as its cache is not cleared each time, and even so, since it also concatenate jquery's code with the rest of the javascript, jquery easy might not be able to find jquery's code and properly handle it.
I would recommend to turn off JCH Optimize for now so that we can better understand the situation and that you can properly test jquery easy.
16 Nov 2021 15:51

Mobile menu not working on Hikashop category pages

Category: Product & Category Display

The problem is that the mobile menu doesn't work, so making a video doesn't show anything since nothing is happening. I have tested it on friends samsung and Huwei and indeed no problem on those devices. I have just asked 5 different friends with iPhones (8,10,11 and 12) and they all have the same problem in Safari and Chrome. When on the 4 Hikashop category pages on my website the mobile menu works after 3 to 4 clicks. I have just installed jquery easy profile and that does solve the problem with the mobile menu when I set it to jquery + mobile and choose include component Hikashop. The only problem is when I do that, the products don't load (url doesn't work) when you click on them. It just shows the loading gif without anything else happening. And when I do that no other button works anymore and I have to reload the page. When I exclude Hikashop component from jquery easy nothing changes. With any other component or template selected, nothing changes and the problem is still there. It only changes when I include Hikashop. So it is indeed a Hikashop issue. But how do I fix this, or use jquery easy and fix the linking to the products?
08 Sep 2021 18:32

Minimal quantity of product to order

Category: Product & Category Display

Hi,

The checkQuantity function is located in the file media/com_hikashop/js/hikashop.js
Note however that you don't need to modify the code of that function in that file.
First, you could copy / paste the code of that function in the view file like this:
<script>
window.hikashop.checkQuantity = function (el) {
 .... code ....
}
</script>
That way, it would override the default function we have in HikaShop and thus you wouldn't loose your modifications to it when you update.

Another solution is to register the event quantity.checked:
<script>
window.Oby.registerAjax(["quantity.checked"],function(params){
 console.log(params.el);
}
</script>
As you can see in the default checkQuantity function, the code to display the notification popup is:
if(hkjQuery.notify) {
				this.translate(['QUANTITY_CHANGE_IMPOSSIBLE', 'MINIMUM_FOR_PRODUCT_IS_X'], function(trans){
					hkjQuery(el).notify({title:trans[0],text:trans[1].replace('%s', min), image:'<i class="fa fa-3x fa-exclamation-circle"></i>'},{style:"metro",className:"warning",arrowShow:true});
				});
			}
You just need to check the key MINIMUM_FOR_PRODUCT_IS_X to a custom translation key of yours
Displaying 1 - 19 out of 19 results.
Time to create page: 0.317 seconds
Powered by Kunena Forum