features how-to for cart & checkout?

  • Posts: 154
  • Thank you received: 4
10 years 10 months ago #163406

now i checked something else as well...

lets say my code in modules.php is:

function modChrome_cart($module, &$params, &$attribs)
{
	if ($module->title)
	{
		echo $module->title;
	}
	else
	{
		echo 'NOTITLE!';	
	}
	if ($module->content)
	{
		echo $module->content;
	}
}

and in index.php i use
<jdoc:include type="modules" name="warenkorb" style="cart" />

then all works! the title is displayed!!!

but when i work this way (as i do in all projects) it does not work:
i choose the module style over module config: advanced > module style > cart
and in my index.php i write as always (no style defined here!)
<jdoc:include type="modules" name="warenkorb" style="" />

for all other modules (custom and other vendors) this is working, and always has, except for hikashop!
is this a bug in hikashop or is this the wrong way of doing this?
whats the point of having in the backend the option to pick a module style if i HAVE to add it also to my style-attribute in index.php ??? you work either the one or the other way (i thought)...

Last edit: 10 years 10 months ago by olivnewton.

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

  • Posts: 83859
  • Thank you received: 13577
  • MODERATOR
10 years 10 months ago #163701

Hi,

I honestly never used the "module style" option. I usually always leave the option empty and set the style in the jdoc tag so that all the modules of the position get the style from the jdoc tag.

So I did some tests and I found the problem.

Edit the file modules/mod_hikashop_cart/mod_hikashop_cart.php and the file modules/mod_hikashopt/mod_hikashop.php
and change the line:
if(!is_object($v)){
to:
if(!is_object($v) && $params->get($k,null)==null){

and then the style option will be taken into account.

The following user(s) said Thank You: olivnewton

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

  • Posts: 154
  • Thank you received: 4
10 years 10 months ago #163794

i used to work exactly as you in the past, but found out, that this way you have much more control over the styling of the modules. especially if you have many modules on the same position but want to have a totally different output on some of them...

will this code-change will be available on the next release or do i need to keep track and manually change it after updating?

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

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

Hi,

As I can see in our logs, Nicolas added it to HikaShop, so this will be in the next release :)

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

  • Posts: 154
  • Thank you received: 4
10 years 10 months ago #164242

great thanks guys!

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

Time to create page: 0.072 seconds
Powered by Kunena Forum