- Posts: 154
- Thank you received: 4
features how-to for cart & checkout?
- olivnewton
-
Topic Author
- Offline
Less
More
12 years 4 months ago - 12 years 4 months ago #163406
by olivnewton
Replied by olivnewton on topic features how-to for cart & checkout?
now i checked something else as well...
lets say my code in modules.php is:
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)...
lets say my code in modules.php is:
Code:
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: 12 years 4 months ago by olivnewton.
Please Log in or Create an account to join the conversation.
12 years 4 months ago #163701
by nicolas
Replied by nicolas on topic features how-to for cart & checkout?
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.
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.
- olivnewton
-
Topic Author
- Offline
Less
More
- Posts: 154
- Thank you received: 4
12 years 4 months ago #163794
by olivnewton
Replied by olivnewton on topic features how-to for cart & checkout?
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?
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.
12 years 4 months ago #163796
by Xavier
Replied by Xavier on topic features how-to for cart & checkout?
Hi,
As I can see in our logs, Nicolas added it to HikaShop, so this will be in the next release
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.
- olivnewton
-
Topic Author
- Offline
Less
More
- Posts: 154
- Thank you received: 4
12 years 4 months ago #164242
by olivnewton
Replied by olivnewton on topic features how-to for cart & checkout?
great thanks guys!
Please Log in or Create an account to join the conversation.
Time to create page: 0.058 seconds