News:

Support the VirtueMart project and become a member

Main Menu

Before/after plugin on products downloadable virtuemart

Started by n2o37, February 10, 2021, 12:43:55 PM

Previous topic - Next topic

n2o37

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.

GJC Web Design

have u enabled the setting in image?

no need to be shy about mentioning the plugin .. useful for other users
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

n2o37

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


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

Jörgen

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
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

n2o37

Perfect, it works in description, but if I want to use it on the image?

Jörgen

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

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

n2o37

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?

Jörgen

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
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.