Cart Module Questions

  • Posts: 441
  • Thank you received: 24
11 years 7 months ago #96951

All right i managed to do several things, first thanks to widgetkit i managed to display the cart ina modal window without problems, but the url in php you gave me leads to a kind of customer cart or multicart, you can put name to the cart an add to wishlist or convert cart to wishlist, but you cant continue to chekout.
What i really would like is to be able to display hikashop cart module in a modal window but i cant get the correct url to do that.

Last edit: 11 years 7 months ago by condorazul.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 7 months ago #97269

The cart module view is in "product / cart".
To call this view, the code:

<?php
if(!defined('DS'))
	define('DS', DIRECTORY_SEPARATOR);
if(!include_once(rtrim(JPATH_ADMINISTRATOR,DS).DS.'components'.DS.'com_hikashop'.DS.'helpers'.DS.'helper.php')){
	echo 'This module can not work without the Hikashop Component';
	return;
};

$js ='';
hikashop_initModule();
$config =& hikashop_config();
$module_options = $config->get('params_'.$module->id);

if(empty($module_options)){
	$module_options = $config->get('default_params');
}

foreach($module_options as $key => $option){
	if($key !='moduleclass_sfx'){
		$params->set($key,$option);
	}
}

foreach(get_object_vars($module) as $k => $v){
	if(!is_object($v)){
		$params->set($k,$v);
	}
}

$params->set('cart_type','cart');
$params->set('from','module');
$html = trim(hikashop_getLayout('product','cart',$params,$js));

if(!empty($html)){
?>
<div class="hikashop_cart_module" id="hikashop_cart_module">
<?php echo $html; ?>
</div>
<?php }
is used. So you can maybe create a view, use this code inside and call the created page in your link.

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

  • Posts: 441
  • Thank you received: 24
11 years 7 months ago #97794

Ok finally i managed to do it and it was much simplier than that.
the only thing we have to do is add in the href="#hikashop_cart"
so the cart is displayed!!!

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

Time to create page: 0.070 seconds
Powered by Kunena Forum