#672 Wrapper for .j2store-product-images and .j2store-product containers

Posted in ‘Technical Support / Bugs’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Olivier on Monday, 02 March 2026 23:54 UTC

Peter Reill

Where can I create an override so that I can create a wrapper in .view-article within .com-content-article__body for the two containers .j2store-product-images and
.j2store-product? I would like to display these in two columns.

Peter Reill

I found the location in the content plugin j2store in the file j2store.php on line 101. When I change this to $text = '<div class="j2store-product-container">' . $image_html . $html . '</div>' . $article->text; I have the wrapper. How can I use this as an override in a way that is safe for updates?

Olivier

Hi Peter,

it is actually not possible to do so whitout the next update to override your additions.

Which leaves me with 2 options:

  • add a container div in the code
  • or add a template to the plugin that users can override.

I believe the lastsolution is the most flexible. 

I want to implement this for the next release. Let me check how this works out.

So, in your case, to avoid disruption, you will need to keep:

  • the override you made in the content plugin (which the update will override),
  • create a template override for the template file I will create (useless until the update, but ready for the update when it comes along). I will let you know what you need to do, once it is ready.

Sounds good?

Olivier.

Growing Together

Help us get back to #1 in the Joomla Extension Directory by leaving us a 5-Star review here.

Peter Reill

The flexible solution sounds great and is a fantastic addition. Thank you very much.

Olivier

Hello Peter,

when J2Commerce 4.1 comes out, you will be able to have wrappers as suggested previously.

You can also create an override for the content plugin. You will just have to go to your template's overrides tab, go to the plugins -> content -> j2store to get the original field to override.

The output will come as:

<div class="j2store-product-wrapper j2store-product-[product_id] j2store-position-[position]">

	<div class="j2store-product-images-wrapper">
		// the product images
	</div>

	<div class="j2store-product-block-wrapper">
		// the product info
	</div>

</div>

Olivier.

Growing Together

Help us get back to #1 in the Joomla Extension Directory by leaving us a 5-Star review here.

Peter Reill

Hi Olivier,

great news. Thank you very much for the excellent implementation.

Olivier

Thank you Peter! That's an improvement that will benefit others :-)

Olivier.

Growing Together

Help us get back to #1 in the Joomla Extension Directory by leaving us a 5-Star review here.

Stay Updated

Subscribe for free and be the first to know about the latest features, updates, and new additions.