Re: Limit Quantities for Downloads and Virtual Products [Support Thread]
Houston ... we have a problem ... :blink:
If a Product is a Gift Certificate and Priced by Attributes it is being treated like a download due to the setting:
Code:
if (zen_get_products_virtual($products_id)) return true;
Virtual Products are not Downloads ... Downloads are only Downloads if there is a filename on the Attribute ...
Is there another case where a Download would be a Virtual Product that I am forgetting? :lookaroun
Re: Limit Quantities for Downloads and Virtual Products [Support Thread]
Ajeh, thanks for the continued testing! The correction for that boo-boo is simple, just comment out the virtual-product check in the ldProductIsDownload function of /includes/extra_cart_actions/limit_downloads.php:
Code:
function ldProductIsDownload ($products_id, $options_id, $options_value_id) {
global $db;
//-v1.1.2d if (zen_get_products_virtual($products_id)) return true;
$sql = "SELECT count(*) as count
FROM " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad, " . TABLE_PRODUCTS_ATTRIBUTES . " pa
WHERE pa.products_id = " . (int)$products_id . "
AND pa.options_id = " . (int)$options_id . "
AND pa.options_values_id = " . (int)$options_value_id . "
AND pa.products_attributes_id = pad.products_attributes_id";
$sql_result = $db->Execute($sql);
return ($sql_result->fields['count'] > 0) ? true : false;
}
I'll get this packaged up (again ...)
Re: Limit Quantities for Downloads and Virtual Products [Support Thread]
That was pretty much my conclusions as well ... and appeared to work on a couple tests last night ...
I cannot think of anything that would be a Download and marked as a Virtual Product or any Virtual Product where you would want to alter the quantities ...
Thanks for staying on top of things ...
Re: Limit Quantities for Downloads and Virtual Products [Support Thread]
This plugin is also safe to use on Zen Carts v1.5.2 and v1.5.3.
Re: Limit Quantities for Downloads and Virtual Products [Support Thread]
Is this plugin compatible with zen cart 1.5.4?
Re: Limit Quantities for Downloads and Virtual Products [Support Thread]
Re: Limit Quantities for Downloads and Virtual Products [Support Thread]
Quote:
Originally Posted by
Ajeh
That was pretty much my conclusions as well ... and appeared to work on a couple tests last night ...
I cannot think of anything that would be a Download and marked as a Virtual Product or any Virtual Product where you would want to alter the quantities ...
Thanks for staying on top of things ...
I've recently (ZC 1.5.3) run across the need to mark a downloadable product that includes an attribute as virtual in order to bypass the request for a shipping address while processing the payment.
Downloadables not marked as virtual that result in asking for shipping created to demonstrate this issue:
http://mc12345678.webatu.com/index.p...&products_id=8
http://mc12345678.webatu.com/index.p...&products_id=9
Same downloadables marked as virtual that do not display shipping options during checkout:
http://mc12345678.webatu.com/index.p...&products_id=3
http://mc12345678.webatu.com/index.p...&products_id=1
The limit quantities for download modification described here has not been applied (yet), but did see that the above question was not answered in this thread..
Re: Limit Quantities for Downloads and Virtual Products [Support Thread]
Unfortunately your site does not work to see what you have set up ...
NOTE: Products with Attributes as Downloads are already Virtual by having the Download on the attribute and already skip the checkout_shipping ... you should not mark the Product as Virtual *and* have the Download Attribute ... just having the Download Attribute should be all that is needed ...
Re: Limit Quantities for Downloads and Virtual Products [Support Thread]
Quote:
Originally Posted by
Ajeh
Unfortunately your site does not work to see what you have set up ...
NOTE: Products with Attributes as Downloads are already Virtual by having the Download on the attribute and already skip the checkout_shipping ... you should not mark the Product as Virtual *and* have the Download Attribute ... just having the Download Attribute should be all that is needed ...
Agree, but when an additional attribute is added on such as, would you like support with this? Then that causes the cycle in the checkout_shipping's header_php.php file to come out of the download identification and require shipping information to be provided.
Odd, someone was able to see one or more of the pages. I know I need to get real hosting, but didn't realize it may be that limited...
Re: Limit Quantities for Downloads and Virtual Products [Support Thread]
Thank you for confirming compatibility with 1.5.4 :-)
Quote:
Originally Posted by
lat9
Yes, it is.