Skip to content

Instantly share code, notes, and snippets.

@makfruit
Last active February 29, 2016 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save makfruit/11148226 to your computer and use it in GitHub Desktop.
Save makfruit/11148226 to your computer and use it in GitHub Desktop.
An HTML/JS snippet for Ecwid to move category description under the subcategories/products listing
<!--
An HTML/JS snippet for Ecwid to move category description under the subcategories/products listing
https://gist.github.com/makfruit/11148226
Put this code after Ecwid integration code on your site
-->
<script src="//code.jquery.com/jquery.min.js"></script>
<script>
Ecwid.OnPageLoaded.add(function(page) {
if (page.type == 'CATEGORY') {
jQuery(".ecwid-productBrowser-categoryDescription").insertAfter(".ecwid-productBrowser-category");
}
});
</script>
@Kizzy65
Copy link

Kizzy65 commented Jun 25, 2014

Hi, How would this work with ecwid in joomla? where would i put the script?

@makfruit
Copy link
Author

Hi,

Sorry, did't get any notification of the comments here.

You will need to put the script into any custom HTML module in your Joomla site and publish that module on the page where your store is installed. See also: http://www.jenkramer.org/blog/custom-javascript-in-joomla

@whatachamp
Copy link

Hey Makfruit. Is there a way to edit this snippet so that the description for my subcategories displays on the main category page under each thumbnail?

So my main category is Fragrances. When the Fragrances category page is shown, there is a thumbnail for each fragrance sub-category (eg. Lavender, Rose etc) and directly under each thumbnail I would like to show that sub-category's description. Many thanks.

@wildflowers1
Copy link

Hi Makfruit
I too am wanting to add a snippet under my images
grid with text
in the grid format, could this be done by taking say the first 100 characters from the main description?
So you would have Image on top, then Title , then text snippet, also have a active "details" link.
The image shown is just a sample,not my website
my website is. www.wildflowersaromatherapy.com
Thanks
Peter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment