-
AuthorPosts
-
TomC Moderator
TomC
- Join date:
- October 2014
- Posts:
- 14077
- Downloads:
- 58
- Uploads:
- 137
- Thanks:
- 948
- Thanked:
- 3155 times in 2495 posts
November 5, 2011 at 10:25 pm #170429Modifying A VirtueMart Product Page
If you want to change/customize your Virtuemart product detail page layout within Virtuemart default template/theme folder, it’s a relatively easy task.
First of all, find the flypage template file in following path: /components/com_virtuemart/themes/default/templates/product_details/flypage.tpl.php( This is the default path, but If you’re using another template for display of your product details page, it may be differ the name such asgarden_flypage.tpl.php or something like that. )
You can use the following variables (listed below) for customizing the layout and other information.
For example, if you want display product name you can use $product_name within PHP brackets and echo the variable inside:
<!– Print out the value of a variable –>
<p>Product Name: <?php echo $product_name ?></p>Don’t forget to close the PHP brackets and always use valid PHP code. If you don’t, it might break your site.
The following list are all of the global variables that can be use within product details page:
product_name
The Product Nameproduct_sku
The Product SKUproduct_s_desc
The Product Short Descriptionproduct_description
The Product Descriptionproduct_weight_uom
The Product Weight’s unit of measureproduct_length
The Product Lengthproduct_height
The Product Heightproduct_width
The Product Widthproduct_lwh_uom
The Unit of Measure for the Product Length,Width,Heightproduct_url
The Product URLproduct_in_stock
The Number of Products currently in Stockproduct_available_date
The UNIX Timestamp for the Product Availability Dateproduct_special
Y or N, is the product on special?product_discount_id
The Product’s Discount IDcdate
The Product’s Creation Date (UNIX Timestamp)mdate
The Product’s last Modification Date (UNIX Timestamp)product_sales
The Number of Sales of this Productproduct_unit
The Product’s Packaging Unitproduct_packaging
The Number of Products per Packageproduct_price_lbl
The price label; “Price:”product_price
The completely formatted product priceproduct_price_raw
The product price array (holding the product_price, product_currency and product_price_idproduct_packaging
Product Packaging informationfile_list
The list of additional files for this product (when the product has files assigned to it)product_availability
The formatted product availability information from themes/default/templates/common/availability.tpl.php; includes the “number of products in stock” and the average delivery time; template file: “common/availability.tpl.php”product_availability_data
The raw product availability data as array; holds the “product_id”, “product_available_date” (unix timestamp), “product_availability” (the string pointing to an image or just a description), “product_in_stock” (number).addtocart
The Add-To-Cart Button Codeproduct_type
Product Parameter Valuesproduct_reviews
The List of Product Reviewsproduct_reviewform
The Form to post a new Product Reviewproduct_image
The small product image; complete image tag; wrapped into an URL when available.product_full_image
The relative filename of the product full image (relative to /components/com_virtuemart/shop_image/products/product_thumb_image
The relative filename of the product thumbnail image (relative to /components/com_virtuemart/shop_image/products/buttons_header
The PDF, Email and Print buttonsnavigation_pathway
The pathway to the product (Power Tools ⇒ Outdoor Tools ⇒ Chain Saw)more_images
The link to the “Product Images” page when the product has additional product imagesmanufacturer_link
The link to the manufacturer info pagevendor_link
The link to the vendor info pageedit_link
The link to the product form of this product (admin only)ask_seller
The link to the “Ask a question about this product” pagerelated_products
The list of related productsnavigation_childlist
The child categories for the current category (this product is located in)images
The object list of all additional images this product hasfiles
The object list of all additional files this product hasThis is the part where your creativity comes into play. Play around with various variables and see how you can create a product page in VirtueMart that stands apart from the standard (aka: boring) product page layout.
😎
1 user says Thank You to TomC for this useful post
-
AuthorPosts
This topic contains 1 reply, has 1 voice, and was last updated by TomC 12 years, 12 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum