VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: micropalla on July 28, 2022, 08:50:52 AM

Title: Front page featured products not showing "add to cart" button
Post by: micropalla on July 28, 2022, 08:50:52 AM
Hello.
I have Joomla 4.1.5 and VM 4.0.6.

I have 5 items featured. I created a module to show featured items. Then I created an article to load the module in with loadmodule and i put it in the frontpage.

All is ok, the items are visible but it is not possible to add them to cart.
In the VM products module both options are on "yes", I mean "Show price" and "Show add to cart link".
I tested it with several templates but it is always not visible.

Can you help me?
Thank you!
Title: Re: Front page featured products not showing "add to cart" button
Post by: Jumbo! on July 28, 2022, 21:23:35 PM
It looks like an issue with your template. Switch to some other template and check how it works.
Title: Re: Front page featured products not showing "add to cart" button
Post by: micropalla on July 29, 2022, 09:00:28 AM
No, as I said, I tested it with several templates and notingh changed.
I attach the image of the Cassiopeia template.
Title: Re: Front page featured products not showing "add to cart" button
Post by: Jumbo! on July 29, 2022, 13:11:50 PM
The screenshot you posted does not belong to the standard VirtueMart layouts, and you must be using a 3rd party extension overriding the default layouts of VirtueMart. It would be best if you disabled the same.
Title: Re: Front page featured products not showing "add to cart" button
Post by: micropalla on July 29, 2022, 21:22:04 PM
Please, how do I do this?
Title: Re: Front page featured products not showing "add to cart" button
Post by: micropalla on July 30, 2022, 16:55:04 PM
I have tried with lot of templates, nothing changes.
I also tried to disable prices and it worsk.
I think the "Add to cart" button missing is a bug of VM.
Title: Re: Front page featured products not showing "add to cart" button
Post by: pinochico on July 30, 2022, 17:00:35 PM
The fault may lie elsewhere :)

Don't try other templates, but try the basic Cassiopeia template and place the module in the module position and not in the article.
Does it work?
Title: Re: Front page featured products not showing "add to cart" button
Post by: micropalla on July 30, 2022, 22:52:20 PM
Good test.
Unfortunately for me it works.
So which is the problem?
The template?

Thank you very much!
Title: Re: Front page featured products not showing "add to cart" button
Post by: pinochico on July 31, 2022, 20:23:05 PM
2 option:
- you add module to article (why?), but you don't setup VM for using in content
- if first option not function(setup use VM in content), then is bug and you have to waiting for next next version :)
Title: Re: Front page featured products not showing "add to cart" button
Post by: micropalla on August 03, 2022, 15:40:44 PM
I added the module to tha article to show on frontpage only the featured items.
Is there a better way to do this?
Thank you for your help!!
Title: Re: Front page featured products not showing "add to cart" button
Post by: GJC Web Design on August 03, 2022, 16:07:48 PM
why can't u just show the module in a module position and enable for home page only?

if this is a problem ( showing on other pages without an Itemid) then try the advanced module extension or add a position in your template controlled by something like ( there's probably a home var already in the template somewhere)

$app = JFactory::getApplication();
$menu = $app->getMenu();
$lang = JFactory::getLanguage();
if ($menu->getActive() == $menu->getDefault($lang->getTag())) {
   // front page module pos
}