VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: favdes on October 06, 2016, 10:56:48 AM

Title: Latest Products and Custom Fields
Post by: favdes on October 06, 2016, 10:56:48 AM
Hello everyone,

I was wondering if someone might be able to help me with this one.

We are almost ready to launch a new VM site but there are a couple of minor adjustments that we'd like to make before we do.

One of them is the 'Latest Products' module which is shown on the home page of the new site (see attached).

As you'll see, where an item has 'Custom Fields', a drop-down box is shown allowing people to customise the product. Instead of the drop-down box, we would like a 'More Information' button to appear, linking to the product information page.

Products without 'Custom Fields' have an 'Add to Basket' button and we'd like to keep this how it is.

Is this possible?

Many thanks



James
Title: Re: Latest Products and Custom Fields
Post by: GJC Web Design on October 06, 2016, 15:34:55 PM
it is -- u need to over ride the sublayout products.php but clone it and rename and call it just for that module
Title: Re: Latest Products and Custom Fields
Post by: favdes on October 06, 2016, 17:42:11 PM
Excellent!

Now, how can I do all of that?    :0)
Title: Re: Latest Products and Custom Fields
Post by: GJC Web Design on October 06, 2016, 18:35:46 PM
http://docs.virtuemart.net/tutorials/templating-layouts/199-sublayouts.html
Title: Re: Latest Products and Custom Fields
Post by: jenkinhill on October 06, 2016, 18:57:56 PM
A complication is that you appear to be using a commercial template so are likely to already have sublayout overrides. - in templates/[YourJoomlaTemplate]/html/com_virtuemart/sublayouts/

If you just wanted to remove the custom field selector then you could do that with css - the image and title will already link to the product details pages (assuming your template follows VM3 convention).
Title: Re: Latest Products and Custom Fields
Post by: favdes on October 10, 2016, 14:34:19 PM
Great stuff, thank you guys.

We've managed to make the changed based on your advice. Thanks again!