Product Snapshot Pro
Install using the Joomla installer. Enable the plugin in the plugin manager
Embedding the product snapshot into a Joomla Article
The product snapshot can be embedded in any content that supports Joomla content plugins. This includes Joomla articles and the custom html module, also many 3rd party extensions such as K2. Use code such as the following:
This will embed the product with an id number of 23 (the id number is the one in the right hand column in the column marked id in the VirtueMart product manager).
You can set default parameters in the plugin manager. These can be overridden with user parameters, the ones available are:
One of the following parameters is required:-
- id (product id, can be a list)
- sku (product sku, can be a list)
- cid (category id eg 4)
- category (category name eg Electronics)
- mid (manufacturer id eg 3)
- manufacturer (manufacturer name eg Microsoft)
- group (values are featured, latest, random, topten, recent)
The others are optional. If used they must be separated by semi-colons and usually have a zero or one value:
This will show three products with the image and description but not the add-to-cart button. The other parameters will take their default values as set in the plugin manager.
This will show three products with the listed skus, with the images and stock levels but no description. The other parameters will take their default values as set in the plugin manager.
will show products from the category with id number 4.
Controlling the Ordering
With listing multiple products you may want to set the orderBy and orderDir parameters. Possible values of orderyBy are:-
orderDir can take the values ASC or DESC
This will list up to 15 products from the tools category, ordered by price in ascending order. Note that the plugin conducts a keyword search so if more than one category has 'tools' in the name (eg, garden tools, power tools) results from both will be displayed.
This will display products marked as featured.
It is possible to combine the cid parameter with some of the others (mid, manufacturer or group) to restrict results to a specific category, eg
This will show the latest products from the category with id number 6.
Price and Custom Field Display
The plugin will display the price fields selected in the VirtueMart price configuration. It will display custom fields, and is fully compatible with the stockable variants plugin.
Image and Layout Options
The imageWidth, imageHeight and layout parameters are only available in the 'Pro' version of the plugin. The imageWidth and imageHeight parameters take an integer value for the size in pixels.
The 'pro' version of the plugin includes extra layouts. These are installed in the tmpl sub-directory of the plugin, and can be overridden by placing your own versions in the html folder of your site template. The layout parameter takes the values: default, thumbnails, small_thumbnails, lightbox_gallery and slideshow. For example:-
If you wish to override the layout there are a long list of data available to your template:-
- $list->product_link - url of VirtueMart product page
- $list->product_link_button - html for product link button
- $list->product_thumb_image - html for product thumb image
- $list->product_s_desc - product short description
- $list->price - sales price
- $list->prices - list of prices information, keys are "basePrice","basePriceVariant", "variantModification","basePriceWithTax", "salesPriceWithDiscount", "salesPrice", "discountedPriceWithoutTax","priceWithoutTax","discountAmount","taxAmount","unitPrice"
eg $list->prices->salesPriceWithDiscount gives sales price with discount
- $list->prices->priceDiv gives complete html for prices
- $list->addtocart_link - url to add product to cart
- $list->addtocart_button - html for add to cart button
- $list->images - array of small image urls
- $list->full_images - array full image urls
- $list->thumbnails - html markup for thumbnails including lightbox if appropriate
- $list->lightbox_links - tag for hidden lightbox links