Cart Item Count

  • Posts: 3
  • Thank you received: 0
12 years 7 months ago #46868

Hi Nicolas,
This question might have been answered previously but I am not finding it. I am new to hikashop and want to display the cart icon on the top of the screen with the number of items in the cart.

I created a custom html module and positioned it on top which takes me to the checkout process but I am unable to display the cart count in that.

Could you please help me with the code snippet which I can use to fulfill this requirement?

Thanks,
Lovely Singh

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

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
12 years 7 months ago #46991

Why not just use the hikashop cart module with the "mini cart" option turned on ? That will display a text with the cart item count and the total price. The message can them be customized with a translation override:
www.hikashop.com/en/download/languages.html#modify

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

  • Posts: 3
  • Thank you received: 0
12 years 7 months ago #47135

Thanks a lot Nicolas, it worked. But was wondering if there was an option to display image instead of text (as I was not able to find it).

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

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
12 years 7 months ago #47380

With the translation override system, you can replace the text with HTML code and that way having an image instead of the text.

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

  • Posts: 131
  • Thank you received: 3
12 years 5 months ago #53960

Hi Nicolas,

Sorry to ask question here!

I have added a cart icon,as you mentioned, but when I save the file, it show an error message with 2nd line success message:
"Could not save the file ...my directory.../language/overrides/en-GB.override.ini"
"Successfully Saved"

The codes I use is :
<img src="../images/sc-cart1.png" width=22> My Cart (0)






Any impact?

Thank You!

Attachments:

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

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
12 years 5 months ago #54011

If you enter your modification in the main area of the translation file, you will loose it next time your update HikaShop. Instead, you should add it in the "override" area, at the bottom of the popup.

Regarding that error, that's because the permissions of the "languages" folder of your website are not correct. You should try to make it 777 and that should hopefully solve the problem of saving the override file.

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

  • Posts: 131
  • Thank you received: 3
12 years 5 months ago #54530

Resolved

Thank you very much again :D

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

  • Posts: 1
  • Thank you received: 0
12 years 4 months ago #58249

:P B) B) B) B) B)

Last edit: 12 years 4 months ago by takis.

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

Time to create page: 0.105 seconds
Powered by Kunena Forum