Shopping Basket


 x 

Cart empty


Log In

Find Us Elsewhere

Forum Search

Keyword

Prevent VM Free Downloads from Cart?

  • iMbroidr
  • iMbroidr's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
2 months 1 week ago #3930 by iMbroidr
iMbroidr created the topic: Prevent VM Free Downloads from Cart?
I'm using both the free and paid versions of your downloads plugins.

If someone goes on a raid through my 'freebies' category and adds every one to the cart without adding any paid items, (rather than go to the details page and do the instant download), the cart never clears on checkout and the products just stay in there.

Is there a way to either:
- or force the cart to empty
- eliminate the add to cart button on the files that use the free plugin? I don't want to apply it to the entire category because some freebies require a coupon code and therefore need to go through the cart.

Or do you have some other better recommendation for handling this?

Also on my wishlist is a way to prevent them from downloading more than xx number of downloads but I'm guessing that wouldn't really work with the way the free plugin works but could be done with the paid version some way?

Thanks for 2 great plugins!

Lindee

Please Log in or Create an account to join the conversation.

More
2 months 1 week ago #3931 by boggler
boggler replied the topic: Prevent VM Free Downloads from Cart?
This sounds like a bug with the Virtuemart checkout process.

Forcing the cart to empty would be difficult, because it requires finding the bug in Virtuemart, patching the code, and submitting the patch to the Virtuemart team in the hope that they will include it in VM, otherwise the first time you update it, the bug will re-appear. So quite a complex process for which you would need to pay a developer.

On our own site we have a similar problem, we have some products that are free to download, we don't want people adding them to the cart. We just made a couple of template overrides, for example for the sublayout addtocart.php we used this to check for a non-zero price before rendering the add to cart button
<?php
	if (!VmConfig::get('use_as_catalog', 0) && $product->prices['salesPrice'] > 0.0  ) {
		echo shopFunctionsF::renderVmSubLayout('addtocartbar',array('product'=>$product));
  } ?>

That may be what you need.

Please Log in or Create an account to join the conversation.

More
2 months 1 week ago #3932 by boggler
boggler replied the topic: Prevent VM Free Downloads from Cart?

Also on my wishlist is a way to prevent them from downloading more than xx number of downloads but I'm guessing that wouldn't really work with the way the free plugin works but could be done with the paid version some way?


That is probably possible for the free plugin by recording the number of download hits as a user session variable, when that is reached further downloads are restricted. It would not stop people coming back later and downloading again, but it might be effective enough. Or it could be stored as a cookie. Again that would not be entirely effective because if the user deletes their cookies then they can come back for more.

We could do that for you as a custom programming job if you like, it should be quite simple, and might be a nice modification to the plugin.

For the paid download plugin you can already restrict the downloads for each item. If you wanted to restrict the total number of downloads for all the items you could use the same method of using a session variable or cookie.

Please Log in or Create an account to join the conversation.

Moderators: boggler
Time to create page: 0.224 seconds