Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Virtuemart Template - CleanMart (SKU# FLEX-00015)

TOPIC: Need Add To Cart button on zero price items

Need Add To Cart button on zero price items 10 years 5 months ago #7358

All my store items have a zero base price, and all sizes are priced with Custom Fields. I believe this is preventing the Add To Cart button from showing up on the Product Detail Pages. How do I force this button to show up?
Last Edit: 10 years 5 months ago by A Fisher.
The administrator has disabled public write access.

Need Add To Cart button on zero price items 10 years 5 months ago #7374

Hi,

Is this is a downloadable product?
Normally If you type 0.00 to price field, the product will get "Call for Price" button instead of add to cart button. This is also same in Virtuemart, because by default, Virtuemart is not ready-to-go for selling downloadable products (or purchasing free physical products) this is why some 3rd party plugins are required to add support of selling digital products to Virturmart.

Currently; this "check" prevents addToCart button to appear (in category page and the product details page)
empty($product->prices['salesPrice'])

This condition should be removed from the PHP files. -OR- if this product is a "downloadable" media product; then the below condition should be added additionally;
and !$this->product->images[0]->file_is_downloadable

So the "ask for price"(instead of add to cart) button will show off only IF product price is zero and IF NOT it is a downloadable product.

Open the category browse and product details PHP files and eliminate this "check price condition" or add the extra condition to check if the product is not downloadable. (THIS WILL WORK ONLY IF YOUR PRODUCTS ARE DOWNLOADABLE MEDIA PRODUCT - like PDF, ZIP etc..), then you will be able to see the add to cart button even though the product price is empty.

For category browse page:
/templates/YOUR_TEMPLATE/html/com_virtuemart/category/default.php
(default.php or flexv2.php which ever layout you are currently using)

For the product details page:
/templates/YOUR_TEMPLATE/html/com_virtuemart/productdetails/default.php
/templates/YOUR_TEMPLATE/html/com_virtuemart/productdetails/default_addtocart.php


I can't provide you any further instruction codes-by code, because this is beyond our free support.
You may consider purchasing premium support through www.flexiblewebdesign.com/premium-support
and let us do those custom coding modifications for you depends on your needs.

Regards,
Support.
Last Edit: 10 years 5 months ago by Support.
The administrator has disabled public write access.
Time to create page: 0.089 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo