Is There An Override For Cart Module

  • Posts: 966
  • Thank you received: 11
13 years 1 month ago #52717

How can I override the "HikaShop Cart Module" please. I checked the views but I don't see it there.

I'd like to change the text layout in the module. Currently it looks like this this:

2 items for $15.95


I'd like to change it to look like this:

2 items for
$15.95


Thanks!!

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

  • Posts: 12953
  • Thank you received: 1778
13 years 1 month ago #52783

Hello,

I think that you can do it if you :

- Go to "Hikashop->System->Language"
- Edit the "English (United Kingdom)" Language file
- Change the line :

X_ITEMS_FOR_X="%s items for %s"
to
X_ITEMS_FOR_X="%s items for </br> %s"

Hope this will help you.

Last edit: 13 years 1 month ago by Mohamed Thelji.
The following user(s) said Thank You: MyWorld

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

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

but what if someone really wants to override the cart module???
i copied mod_hikashop_cart/mod_hikashop_cart.php into mytemplate/html
and made changes to mod_hikashop_cart.php, but it wouldnt override...
what am i doing wrong?

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

  • Posts: 84079
  • Thank you received: 13635
  • MODERATOR
12 years 10 months ago #65314

You should not do it like that.
If you want to override the cart module, you can edit the file "cart" of the view "product" via the menu Display->Views.

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

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

i see! thanks for the quick reply. where can i find those files inside joomla-file-structure? i would like to edit them manually with my code-editor, rather than via display->views. this way i can better comment and keep track of changes i made.

also, if i decide to buy the styles-pack, will this override my changes in display->views or do i then need to re-do all changes on this certain template i will install again?

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

  • Posts: 84079
  • Thank you received: 13635
  • MODERATOR
12 years 10 months ago #65465

It's the file components/com_hikashop/views/product/tmpl/cart.php
But you should not edit directly the file as you will loose your changes when you update HikaShop.
If you do it via the interface on the other end, you won't loose your changes as they will be stored as view overrides in the html folder of your template.

The styles pack won't override your view files. They just contain CSS and images to style the different elements of HikaShop bu they don't change the structure.

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

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

ok, i understand. then i can create my own view-overrides in my template folder and make changes there with my code-editor?

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

  • Posts: 84079
  • Thank you received: 13635
  • MODERATOR
12 years 10 months ago #65621

Yes. Just save the view file once in the Display->views menu and you will get the file in the good folder in the template and you can just edit the file directly with your editor.

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

  • Posts: 154
  • Thank you received: 4
12 years 9 months ago #65772

but i dont have to save it in backend, if i copy manually the file into the template, it will still be marked as "customized" in the backend, isnt it?

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

  • Posts: 84079
  • Thank you received: 13635
  • MODERATOR
12 years 9 months ago #65907

Yes, that's indeed the case :)
It's just to make it easier for non programmers or beginners.

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

  • Posts: 154
  • Thank you received: 4
12 years 9 months ago #65977

great thanks!

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

Time to create page: 0.090 seconds
Powered by Kunena Forum