VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: n2o37 on February 10, 2021, 12:43:55 PM

Title: Before/after plugin on products downloadable virtuemart
Post by: n2o37 on February 10, 2021, 12:43:55 PM
Hello everyone!

I am trying to understand how to implement a plugin within the single products of virtuemart that shows me the before and after of a photo with the cursor in the middle which, moving it to the left or right, shows more the before and after of the same image .


The plugin works well if I use the code strip that must be used inside a simple article (in the editor of course)


If anyone knows it without naming the plugin, the code strip you use is this:


Code: [Select]
<p> {twenty} image1 = / fruitshop / _MG_9716-2.jpg | image2 = / fruitshop / _MG_9716.jpg | columnwidth = 3 {twenty} </p>


To work, I load the two images (before and after) and then using this code it goes.


Now I would like to understand how to use it within individual product photos, since I sell downloadable products.


Has anyone had this kind of problem before?


Thanks in advance for any help.
Title: Re: Before/after plugin on products downloadable virtuemart
Post by: GJC Web Design on February 10, 2021, 12:59:41 PM
have u enabled the setting in image?

no need to be shy about mentioning the plugin .. useful for other users
Title: Re: Before/after plugin on products downloadable virtuemart
Post by: n2o37 on February 11, 2021, 08:47:54 AM
Thank for your answer, this is the plugin "OT Before & After Image Slide - Joomla Extension"

https://www.oceantheme.org/joomla-extensions/photos-and-images/ot-before-after-image-slide.html (https://www.oceantheme.org/joomla-extensions/photos-and-images/ot-before-after-image-slide.html)


enabling that I have to create the custom field? because my aim is to replace the image so that the plugin is displayed instead of that
Title: Re: Before/after plugin on products downloadable virtuemart
Post by: Jörgen on February 11, 2021, 08:59:50 AM
You will not need the custom field, this plugin call can be added to the product description if you enable the VM setting for plugins,

Jörgen @ Kreativ Fotografi
Title: Re: Before/after plugin on products downloadable virtuemart
Post by: n2o37 on February 11, 2021, 09:04:20 AM
Perfect, it works in description, but if I want to use it on the image?
Title: Re: Before/after plugin on products downloadable virtuemart
Post by: Jörgen on February 11, 2021, 09:14:44 AM
I am not quite sure if there is a shortcut, But You can edit the product view default.php, default_images and default_additional_images. in Your template;

templates/your-template/html/com_virtuemart/productdetails (http://templates/your-template/html/com_virtuemart/productdetails)

Jörgen @ Kreativ Fotografi
Title: Re: Before/after plugin on products downloadable virtuemart
Post by: n2o37 on February 11, 2021, 09:54:04 AM
At first I thought so too, but doing this I'll have to use a line of code like this:

<p> {twenty} image1 = / fruitshop / _MG_9716-2.jpg | image2 = / fruitshop / _MG_9716.jpg | columnwidth = 3 {twenty} </p>

but instead of "/fruitshop/_MG_9716-2.jpg" and "/fruitshop/_MG_9716.jpg" a line of code that uses the class called by the product to show the specific image. quite right?
Title: Re: Before/after plugin on products downloadable virtuemart
Post by: Jörgen on February 11, 2021, 13:32:33 PM
I guess you can echo this line in place of the current image code and if the plugin does not render this code, you can force a plugin trigger. This has been mentioned before in the forums and someone with knowhow ca probably show you the call,

Jörgen @ Kreativ Fotografi