#301 redirect from content view to j2c

Posted in ‘Feature Requests’
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 Wednesday, 21 January 2026 21:13 UTC

Serge Billon

Hello,

As the product module is not really done, I have set a module in sp page builder to  display joomla content .
is it possible to have a plugin with that behaviour :
If a joomla content is a product, then display j2c view ( or redirect to)

?

Thanks in advance for answering

Olivier

Hi Serge,

ideally, this would be done through the J2Commerce router, which creates the links on the fly.

However, when you create a module for articles, the router that takes place is the Content router. 

So for this kind of 'mixed' module to work, first we would need to query the database, check if the article is a product, and then create the link through the appropriate router.

Olivier.

Growing Together

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

Serge Billon

Thanks

I don't understand if it is already functional and should therefore work as it is, or if it is something you are considering doing: if so, when?

Olivier

Serge,

the product module that we will release only works on products.

The module needs to have an itemId parameter (or a select box that you can use to set which menu item the products will open into). I will make sure this gets implemented. 

My explanations were for the module you created, in the case you can modify the code.

I have no release date for our module.

Olivier.

Growing Together

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

Serge Billon

On ne se comprend pas, j'écris donc en français et traduit.
le module / widget dans sp pagebuilder crée des liens de types : 
/component/content/article/jouet-pour-chien-bobby?catid=16&Itemid=101
en  non sef : 
/index.php?option=com_content&view=article&id=23:jouet-pour-chien-bobby&catid=16&Itemid=101
et cela c'est une vue content.
pour bien faire ( et je ne sais pas faire car pas développeur ) , il faudrait un plugin qui reconnaisse si un article dans la bdd est un produit et rédirige l'url ( c'est le cas pour le composant flexicontent ) 
l'url serait 
/boutique/jouet-pour-chien-bobby
non sef :
/index.php?option=com_j2store&view=products&task=view&id=4&Itemid=443
Pourquoi j'ai utilisé du contenu joomla content dans le module : j'ai désactivé la boutique pour l'instant car elle doit être en mode catalogue pendant 5 mois, et les prix des variantes ne s'affichent pas.
donc j'utilise du jcontent avant d'utiliser la boutique.
Je pense que si on avait un plugin tel que décrit plus haut, cela permettrait d'utiliser tous les modules jcontent avec j2commerce.

english version :

We don't understand each other, so I'm writing in French and translating.
the module / widget in sp pagebuilder creates links of type :
/component/content/article/toy-for-dog-bobby?catid=16&Itemid=101
in non-sef :
/index.php?option=com_content&view=article&id=23:dog-toy-bobby&catid=16&Itemid=101
and this is a content view.
To do this properly (and I don't know how because I'm not a developer), you'd need a plugin that recognises whether an article in the database is a product and writes the url (this is the case for the flexicontent component).
the url would be
/boutique/jouet-pour-chien-bobby
non sef :
/index.php?option=com_j2store&view=products&task=view&id=4&Itemid=443
Why I used joomla content in the module: I've deactivated the shop for the moment because it needs to be in catalogue mode for 5 months, and the prices of the variants aren't displayed.
So I'm using jcontent before using the shop.
I think that if we had a plugin as described above, it would allow all jcontent modules to be used with j2commerce.

Olivier

J'avais bien compris le problème :-)

C'est prévu dans le module de produit qui est en fin de dévelopement/test. Len liens générés dirigeront vers les pages produit.

"Je pense que si on avait un plugin tel que décrit plus haut, cela permettrait d'utiliser tous les modules jcontent avec j2commerce."

Pour ce qui est de l'utilisation de n'importe quel module/view de com_content et créer des liens vers les pages produit, je ne sais pas si c'est bien possible car les liens sont créés par le router de com_content. Il faudrait que ce soit le router de com_content qui détermine si le lien doit être créé comme un lien de com_content ou si le lien doit être redirigé vers le router de J2Commerce.

Olivier.

Growing Together

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

Adam Melcher

Serge,

I understand what you are asking and it's actually not a bad idea and opens the door to a lot of possibilities. Let me think about the best method forward and I will discuss will Olivier.

 

Adam

Growing Together

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

Serge Billon

Hello,

Did you had time to discuss with Olivier and to think about this idea ?


Olivier

We have discussed about it, yes, Serge.

We will implement it in the near future.

Olivier.

Growing Together

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

Serge Billon

Hello,

I am reposting this to find out more about the progress of this feature.

It affects one of my projects, and even future decisions regarding other upcoming sites.
The idea of using any Joomla module to display and promote articles is excellent: it really opens up endless possibilities.

But if the links are not redirected to product pages, when it comes to products, then I won't be able to do it.

Thank you.

 

Olivier

Serge,

I have given a shot to what you are looking for. I have created an initial plugin to see what could be done. I wrote you a direct message.

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.