features how-to for cart & checkout?

  • Posts: 154
  • Thank you received: 4
11 years 2 days ago #157552

dear team, i was wondering how to accomplish the following

cart module:
1. "show title" is YES but its not showing (maybe because "mini cart" is YES?)
2. hide cart module if empty

checkout:
i managed to hide cart on checkout (not an easy task, but it worked)
created 2 menus:
- hikashop > product
- hikashop > checkout (this info was missing in mohameds description: www.hikashop.com/forum/checkout/863039-n...-be-easy.html#129157 )
- in "Hikashop->System->Configuration->'Checkout'"
used the "Force a menu on the checkout" option to one of your menu (= in my case "checkout")
- in the "Module Assignment" of my cart module
set option to "Only on the pages selected"
un-checked the menu that your have set through the "Force a menu on the checkout" option (= in my case "checkout")

but now in the adress bar i get the following URLs:
myshop.com/checkout/checkout/
myshop.com/checkout/checkout/task-step/step-0...x

1. is it possible to get rid of the double "checkout"?
2. is it possible to add custom text for "task-step" and "step-0 ... x"?

best regards

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

  • Posts: 13201
  • Thank you received: 2322
11 years 2 days ago #157575

Hi,

1. The title should be displayed, don't you have a css rules which is hiding the title ?
2. This will require some JavaScript, check if the element is empty via javascript and hide the parent.

1. By changing the menu name, you can avoid to have it twice. Or by using sef component.
2. This will require modifications in the controllers, etc so core file. It's not recommended.

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

  • Posts: 154
  • Thank you received: 4
11 years 1 day ago #157673

thanks for the quick reply!

1. no there is no such css rule and also no template override. here is the module code, as you can see no title in there:

<div id="hikashop_cart_module" class="hikashop_cart_module">
<div class="hikashop_cart" id="hikashop_cart">
				<a href="/bestellvorgang/checkout" class="hikashop_small_cart_checkout_link">
				<span class="hikashop_small_cart_total_title">3 Artikel für 
								<span class="hikashop_product_price_full">
												<span class="hikashop_product_price hikashop_product_price_0">44,70 €</span>
								 </span>
				</span>
				</a>			
				<a href="#" onclick="window.location='/online-shop/product/cleancart?return_url='+window.btoa(window.location); return false;" class="hikashop_small_cart_clean_link">
								<img border="0" alt="clean cart" src="/media/com_hikashop/images/delete2.png">
				</a>
				<input type="submit" onclick="var field=document.getElementById('hikashop_product_quantity_field_3');window.location='/bestellvorgang/checkout';return false;" value="Zur Kasse" name="checkout" class="btn button hikashop_cart_input_button"></div>
<div class="clear_both"></div>
</div>

2. tried just now, even if cart is empty, the element is not, because there appears the message "cart is empty" inside of it...
any idea?

checkout 1. & 2. ... i see, would be nice though to change (2) via language files?

Also there appeared another issue / question today:
- we are trying to add direct custom "add to cart" links from other non-hikashop sections of the website
- so far we could figure out how to do this from within hikashop sections:
hikashopModifyQuantity('X',1,1,'hikashop_product_form_X_hikashop_category_information_menu_169','cart',0);
the produkt with the ID[X] gets added to the cart. if i want to use this js outside the shop, i get in firebug "ReferenceError: hikashopModifyQuantity is not defined"
- what scripts do i have to include in order to use the js outside the shop?
- or is there maybe an even better way?

best regards

Last edit: 11 years 1 day ago by olivnewton.

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

  • Posts: 26242
  • Thank you received: 4036
  • MODERATOR
10 years 11 months ago #158245

Hi,

1.1 - The titles of the modules are displayed by Joomla. Please check the configuration of the Joomla module.
I know that there was a bug in an old version of HikaShop ; you didn't provide yours so I can't know if it is linked or not.

1.2 - I am sorry but I don't understand, I don't visualize it.

2.2 - It is not possible to use the language file for that.

3.1 - The javascript function is defined by HIkaShop and works only in HikaShop.
If you want to add products using an url, you can add the "updatecart". In the backend, while editing a product just click on the button "Add to cart link" and it will provide you the current link for the specific product.

Regards,


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.

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

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

hi, sorry i forgot: HikaShop Essential: 2.3.1 on J! 3.2.3

1. in joomla config "show title" is set to yes and i use no override

2. i will try to explain: in order to hide the empty cart module, you suggested to check via javascript if the element is empty and then hide the parent... but, the element is not empty, it contains the text "cart is empty":

<div id="hikashop_cart_module" class="hikashop_cart_module">
     <div class="hikashop_cart" id="hikashop_cart">Cart is empty </div>
     <div class="clear_both"></div>
</div>
...how should i check? $('#hikashop_cart').is(':empty') is not working in this case...

3. will try the updatecart link

thanks

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

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

any news on this?

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

  • Posts: 83890
  • Thank you received: 13579
  • MODERATOR
10 years 11 months ago #159502

Hi,

Removing the cart module when the cart is empty doesn't involve any coding.
Just do a translation override of the cart empty message ( hikashop.com/download/languages.html#modify ) in order to empty the text. If no text is added, the module itself won't add its own HTML, and if it doesn't, the CMS/template won't display the chrome around the module either.

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 11 months ago #160612

great stuff nicolas! thank you!

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

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

...but still no title showing on cart module...

i even just created a custom module style (in modules.php) and selected this in "cart module" > "advanced" > "module style"
...still no luck...

Last edit: 10 years 11 months ago by olivnewton.

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

  • Posts: 83890
  • Thank you received: 13579
  • MODERATOR
10 years 11 months ago #160675

The title of the module is displayed by the template, not HikaShop.
If you don't see the title of the module while you activated the option of the module to display it, it probably means that you configured the module to display in a position of the template where the title is not displayed for modules.

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

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

i know, i am using joomla for 10 years now, the same site has other modules as well, all inserted to the same position with the same procedure. maybe i am missing something??? i dont know. please have a look:

in index.php:
<jdoc:include type="modules" name="moduleRechts" style="" />

in modules.php:
function modChrome_warenkorb($module, &$params, &$attribs) { ?>
<h3>Title: <?php echo JText::_( $module->title ); ?></h3>
<?php echo $module->content; ?>
<?php
}

see screenshots position.PNG & module-style.PNG

Attachments:
Last edit: 10 years 11 months ago by olivnewton.

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

  • Posts: 83890
  • Thank you received: 13579
  • MODERATOR
10 years 11 months ago #160852

What you're doing seems correct indeed.
I don't see why it wouldn't work.
Do you see the h3 tags where the module title should be ? Maybe it's the translation which removes the title.
You could try without the JText::_() function call.

If you remove the display of the content of your chrome function, do you still see the content of the module ? If so, it could mean that it is a cache problem, or the wrong style selected in the dropdown (maybe two styles with similar names, or something ?)

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

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

thats the point!
i dont even see the h3 tags, thats why i added for test <h3>Title: ... in my code.
so its not the translation or jtext::...

if i remove the module style in advanced or set it to default / inherited it still shows up the same...
it is not a cache problem. joomla caching is disabled and i cleared browser caching several times.
today i even work from homeoffice on a different pc...

it is also not 2 styles with similar names, as "warenkorb" is present only once...

i tried again to make chrome changes to other modules, different styles etc. it all works!!!
all except the hikashop cart module...

i just read my posts in this thread from the beginning, my very first question was if this could happen due to the fact that i am using the "mini cart" but as nobody answered specifically on this i assumed the answer would be "no". so again: could it be that "mini cart" is the reason?

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

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

FYI: i just switched from mini-cart to normal view and still no h3 visible...

and:
in modules/mod_hikashop_cart/mod_hikashop_cart.php
line49
echo $html seems not to contain the title...

Last edit: 10 years 11 months ago by olivnewton.

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

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

friendly bump...
any news here?

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

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

Hi,

It's normal to not have the title in the $html of the cart module. It's no handled by HikaShop.
We just display the content inside the module, not the whole module and it's title.

That really seems to be a Joomla / template issue than a HikaShop one.

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

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

ok.
as you can see in #160722 all i am doing is right.
nicolas wrote he cant see any mistake...

any way i could provide you with more information in order to debug this?

all other modules work (custom and not) the same way, all get the styling i define in modules.php ...
all except the hikashop cart (no matter if minicart or not)...

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

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

Do you tried to create a new cart module in order to see if it's working for a new one, it's maybe the entry in the configuration which is wrong.

Is you title a simple title ? Or there is specific characters inside ?

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

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

just created a new cart module... still no title

yes, it is a simple title without special characters...

i tried also other hika modules (for example "hika shop content module"... same problem, no title showing up at all, even if i select in "module manager" > "advanced" > "module style" : any style through all styles of my template... tried them all through, even those custom ones in joomla, even "inherited"...

with other joomla modules (for example "who's online"), title shows up when i select the appropriate style in "module style" out of my template...

i even changed the code in modules.php from
<h3><?php echo JText::_( $module->title ); ?></h3>
<?php echo $module->content; ?>

to

<h3><?php echo $module->title; ?></h3>
<?php echo $module->content; ?>

(removed JText::_)

still, it doesnt work. it looks like if hikashop modules totally ignore the setting in "module manager" > "advanced" > "module style" !!!

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

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

friendly bump?

FYI:
i installed hikashop 2.3.1 on a new site we are building, this one with blank template and no modules or overrides so far... if i make all configurations as i need, and enable the hikashop cart module, again it shows no TITLE!
also i just updated to 2.3.2, same error, no title displayed...

did you try to reproduce this?

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

Time to create page: 0.098 seconds
Powered by Kunena Forum