VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: suffering on June 04, 2019, 10:26:25 AM

Title: Change layout position of ontop
Post by: suffering on June 04, 2019, 10:26:25 AM
Hello
I have one problem

I want to add badges to my product details page on the image (HOT,NEW etc)
I have made custom fields and choosed ontop position.
My problem is that this is not displayed over the image as you can see in the attachment.
How can i make ontop position to be displayed over the image?
I am using Joomla 3.9.6 and VM 3.4.0.
Title: Re: Change layout position of ontop
Post by: Jörgen on June 04, 2019, 11:29:24 AM
This is a template issue, You have to add a new position or move the current ontop position in Your template.

Jörgen @ Kreativ Fotografi
Title: Re: Change layout position of ontop
Post by: suffering on June 04, 2019, 11:45:45 AM
Quote from: Jörgen on June 04, 2019, 11:29:24 AM
This is a template issue, You have to add a new position or move the current ontop position in Your template.

Jörgen @ Kreativ Fotografi
Thank you for answer.
My template mod told me this is VM issue and i had to ask here ?  :-[
Title: Re: Change layout position of ontop
Post by: Jörgen on June 04, 2019, 13:00:19 PM
This is not a VM issue, ontop is to be placed ontop of the custom area. So there is actually no VM issue.

The template position is in the template, You use a CUSTOM template, I do not use this template. Look in the template and search for ONTOP. Move this to the position where You want it. I do not know how the code look like in Your template. I can only guess.
If Your template designer (whom You paid) does not want to help with this, then move it on Your own

Jörgen @ Kreativ Fotografi
Title: Re: Change layout position of ontop
Post by: jenkinhill on June 04, 2019, 13:20:15 PM
The code to look for in templates/YourJoomlaTemplate/html/com_virtuemart/productdetails/default.php will be something like this:

echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'ontop'));
Title: Re: Change layout position of ontop
Post by: suffering on June 04, 2019, 15:47:11 PM
Quote from: jenkinhill on June 04, 2019, 13:20:15 PM
The code to look for in templates/YourJoomlaTemplate/html/com_virtuemart/productdetails/default.php will be something like this:

echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'ontop'));

Hello and thank you for your imidiatte help and reply.
I found this in the file you said but i cannot make it to move on the image.
Can you assist me on that please?
Title: Re: Change layout position of ontop
Post by: Studio 42 on June 04, 2019, 15:51:26 PM
You have to remove this line and copy/paste it before image zone
Most time the layout is default_image.php in the same folder as default.php
You can disable title display in the custom field
Of course you need add some CSS to render it nice