Viewing 1 post (of 1 total)
  • Author
    Posts
  • TomC Moderator
    #170429

    Modifying 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 Name

    product_sku
    The Product SKU

    product_s_desc
    The Product Short Description

    product_description
    The Product Description

    product_weight_uom
    The Product Weight’s unit of measure

    product_length
    The Product Length

    product_height
    The Product Height

    product_width
    The Product Width

    product_lwh_uom
    The Unit of Measure for the Product Length,Width,Height

    product_url
    The Product URL

    product_in_stock
    The Number of Products currently in Stock

    product_available_date
    The UNIX Timestamp for the Product Availability Date

    product_special
    Y or N, is the product on special?

    product_discount_id
    The Product’s Discount ID

    cdate
    The Product’s Creation Date (UNIX Timestamp)

    mdate
    The Product’s last Modification Date (UNIX Timestamp)

    product_sales
    The Number of Sales of this Product

    product_unit
    The Product’s Packaging Unit

    product_packaging
    The Number of Products per Package

    product_price_lbl
    The price label; “Price:”

    product_price
    The completely formatted product price

    product_price_raw
    The product price array (holding the product_price, product_currency and product_price_id

    product_packaging
    Product Packaging information

    file_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 Code

    product_type
    Product Parameter Values

    product_reviews
    The List of Product Reviews

    product_reviewform
    The Form to post a new Product Review

    product_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 buttons

    navigation_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 images

    manufacturer_link
    The link to the manufacturer info page

    vendor_link
    The link to the vendor info page

    edit_link
    The link to the product form of this product (admin only)

    ask_seller
    The link to the “Ask a question about this product” page

    related_products
    The list of related products

    navigation_childlist
    The child categories for the current category (this product is located in)

    images
    The object list of all additional images this product has

    files
    The object list of all additional files this product has

    This 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.

    😎

Viewing 1 post (of 1 total)

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