Template override for mod_hikashop / edit hikashop

  • Posts: 32
  • Thank you received: 0
10 years 6 months ago #191521

-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.1

I have tried creating a template override for mod_hikashop using Joomla but it fails so I have manually copied the mod_hikashop.php file over into %templatepath%/html/mod_hikashop but now, when I try to edit the file there it nothing there to rearrange the way the module is displayed. Currently the price displays befor ethe title and the title isn't H4 and I would like it to bo, I don't want it to show the description either, or to just show a snippet - basically I want to customise it quite alot, so how do I get template overrides working for mod_hikashop, please?

Thanks

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

  • Posts: 32
  • Thank you received: 0
10 years 6 months ago #191541

Have now upgraded to 2.3.5 but still no luck with overriding. Also the module doesn't seem to show the product description anymore or the read more link :(

Last edit: 10 years 6 months ago by Tuscan Triangle.

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

  • Posts: 2143
  • Thank you received: 747
10 years 6 months ago #191551

This module is to show HikaShop content such as category/product listings in a module instead of in the component area. Other than giving you additional options such as carousel and else, it uses the same views - hence, override features. So, you should follow the usual procedures to create overrides of existing layouts, or new ones to apply to modules.

Also the module doesn't seem to show the product description anymore or the read more link

You might have altered main and/or default configuration options, or chosen a different layout option for the module in question. It's impossible to say more without seeing the site and/or a screenshot of the module configuration.

Needless to say that it's also impossible to say more if you have modified the mod_hikashop files, indeed. First, remove such "customisation" and see if that improves things. Quite frankly, there isn't much good reason I can think of for messing with those files...


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Last edit: 10 years 6 months ago by lousyfool.

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

  • Posts: 32
  • Thank you received: 0
10 years 6 months ago #191557

Hi lousyfool,

thanks for your reply. I am wanting to display a module with a single randomised product - I realise that the module is capable of more and that different numbers of products can be displayed but I want to display one only. At this point I have NOT altered any code whatsoever and have deleted the override created by Joomla which didn't work anyway.

You can see the site here: j3.tuscantriangle.com - scroll to the bottom and you will see four boxes, the fourth of which is for the shop. The customisations I want to make are in order to match the styles of the other three boxes. As you can see, image comes first, then price and then title. No description and no read more. I need the heading to appear first and I need it to be <H4>. The price should be next and then some description and finally a read more link. Doing this with CSS alone isn't possible.

Creating an override doesn't work:

An error has occurred.
-1 Source folder not found

Screenshots of content module settings attached

Attachments:

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

  • Posts: 2143
  • Thank you received: 747
10 years 6 months ago #191572

Hi again,

First on the module configuration, see if you get the single random product you want there:

You have the column/number settings right for displaying only a single product, indeed.

Other settings for you to review:
"Random items": It you want random, why do you set it to "No"? It must be "Yes", obviously.
"Sub elements filter": Unless the products the module shall pick from are in the "Product category" (and not only in sub categories), you should set it to "All sub elements".
"Synchronize with currently displayed item when possible": Eventually turn it off.
"Recently viewed": No.

Should work.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 32
  • Thank you received: 0
10 years 6 months ago #191737

I had just deleted the module and created a new one when I took the screenshot so hadn't made the obvious configuration changes such as one item, random etc etc. I have had no issues in getting the module to display random products from the entire product catalogue, this would have been apparent from the link I provided - that wasn't the issue I raised, but thank you for noticing.

The query I raised here is that of changing the layout of the module / getting overrides to work so that I can change the order of the divs and potentially add more information in.

Any guidance on this issue would be much appreciated.

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

  • Posts: 2143
  • Thank you received: 747
10 years 6 months ago #191754

Well, sorry for getting into irrelevant detail, but I did so based on the information you provided - to get that out of the way "first", as I said, and before making a next step.

Now, since that is out of the way, I understand you want a brief description in that "listing" module, and a few other layout changes. Shouldn't be difficult at all:

It appears that this listing is the only one where a brief product description (by using the "readmore" function) shall show, yes? If that's the case, you should select the div "Type of item layout" option "Image and description" for this listing module.
Next, you may go and edit the view "product / listing_img_desc" for your template, and customise it to what you want including the order of things, wrapping the product name in <h4> tags, and what not else.
Again, this will work only if you don't use "Image and description" anywhere else, as it'll affect all divs with that option selected - in which case you'd still not be lost... you could simply create your very own custom view, too.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 32
  • Thank you received: 0
10 years 6 months ago #191755

Thanks for the quick reply. I'll look into that this afternoon and get back to you with my progress. :)

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

  • Posts: 32
  • Thank you received: 0
10 years 6 months ago #191824

Hi lousyfool,

thanks. File located, I can see the code for the layout now, perfect. I don't want to edit the original file, obviously, but not having much luck with getting an override to work. Where, in my template structure, should the listing_img_desc.php file be located?

have tried html/com_hikashop/views/product but no joy.

TIA

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

  • Posts: 2143
  • Thank you received: 747
10 years 6 months ago #191828

Of course, you don't want to modify an original file if somehow possible!

In addition to the standard Joomla override system, luckily HikaShop has it's own interface built in for this. Follow this tutorial, and you'll be safe: www.hikashop.com/support/support/documen...-display.html#layout

(in general, the documentation accessible here under -> Support -> Documentation has many more such jewels on offer. RTFM! :lol: )


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 32
  • Thank you received: 0
10 years 6 months ago #191839

Thanks lousyfool. Frustrating when the built in override functionality isn't used, like reinventing the wheel. Non the less, you have pointed me in the right direction and I will be fine from here.

Thanks again for your help.

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

  • Posts: 2143
  • Thank you received: 747
10 years 6 months ago #191842

Tuscan Triangle wrote: Frustrating when the built in override functionality isn't used, like reinventing the wheel.


Not sure what you mean. I said, "In addition to the standard Joomla override system..." - meaning, not only is HikaShop using Joomla's override system, but it comes also with a user interface for it. No one forcing you to use it, but if anything, IHMO one should be rather happy for being offered an alternate route.

Anyway, glad you're on the way.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 32
  • Thank you received: 0
10 years 6 months ago #191843

I mean you are unable to use the Joomla native system to create a template override. See post #191557

OR should I say that "I" am unable to - may work for others. But it doesn't matter, as long as I have a solution that's all that matters.

Last edit: 10 years 6 months ago by Tuscan Triangle.

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

  • Posts: 2143
  • Thank you received: 747
10 years 6 months ago #191846

Well, there's nothing relevant for the mods you require in the file you're referring to there. That's only the "framework" loading the content view I've been pointing you to - because you have options in a dropdown for loading one of multiple views in the HikaShop backend. Still, you are able to create a proper override in accordance with Joomla standards for those views.

Might take a little to get your head around it, but once you did, you have the ease of toggles and dropdowns in the backend combined with view overrides - for ultimate flexibility.

All right - roger, over & out :)


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

Time to create page: 0.067 seconds
Powered by Kunena Forum