Author Topic: Minimum quantity in add to cart box  (Read 7702 times)

lochraven

  • Beginner
  • *
  • Posts: 37
Minimum quantity in add to cart box
« on: October 27, 2009, 17:11:20 pm »
Is there a way to have the Minimum Qty show in the Add-To-Cart box?

Joomla 1.5.2  VM 1.1.0

nigeldeethiopia

  • Beginner
  • *
  • Posts: 2
    • Asgard Development
Re: Minimum quantity in add to cart box
« Reply #1 on: November 22, 2009, 22:49:05 pm »
Hi lochraven,

I had the same issue.  After searching and finding absolutely nothing on the issue I came up with a hack of my own.   I modified the following file: /components/com_virtuemart/themes/default/templates/product_details/includes/quantity_box_general.tpl.php

I added the following code immediately after:
extract( $quantity_options );

Code: [Select]
//Minimum Quantity added by Asgard Development
require_once('administrator/components/com_virtuemart/classes/ps_product.php');
$minimum_quantity_ad = ps_product::product_order_levels($prod_id);


//Minimum Quantity added by Asgard Development
if($minimum_quantity_ad[0])
  $quantity = $minimum_quantity_ad[0];

It works for me.  Hopefully it helps you out.

Nick
------------------------------------
Asgard Development
http://www.asgard-dev.com

silentmercy

  • Beginner
  • *
  • Posts: 4
Re: Minimum quantity in add to cart box
« Reply #2 on: January 04, 2010, 19:09:33 pm »
Awesome post.  Simple modification that works.  Thanks for saving me the time of digging through the code for this.

I found this when searching an error when adding less than the minimum order to the cart.  Problem solved  :D

timkolm

  • Beginner
  • *
  • Posts: 40
Re: Minimum quantity in add to cart box
« Reply #3 on: March 03, 2011, 20:04:57 pm »
Great thanks for your mod!! It is simple and effective!

evboes

  • Beginner
  • *
  • Posts: 1
Re: Minimum quantity in add to cart box
« Reply #4 on: June 19, 2011, 16:19:42 pm »
I cant find that file in my VM - only quantity_box_radio.tpl.php

Joomla 1.5 - anyone know what I can do?

RobertL

  • Beginner
  • *
  • Posts: 43
Re: Minimum quantity in add to cart box
« Reply #5 on: December 18, 2011, 20:29:39 pm »
thank for the mod nigeldeethiopia. Works as it should.

There is one thing that would make the solution more complete. What happens at the moment is, it shows minimum quantity correctly. However, let's say product minimum buy is 3. You have to add 3, but you also have to add increments of 3, otherwise
it doesn't get added, and no error message is shown (different topic). Lucky enough for me, that's exactly what I need (shy of the problem of course) for current project, but...what I'd like to also happen is for the increment to work on increase rather than
allowing increment by 1. Basically, for the arrow up of to bring the value from 3 to 6, 9, 12 etc and not to 4, 5, 6, essentially, increasing the click by minimum order increment rather than 1.

any help would be appreciated.

jwdltd

  • Beginner
  • *
  • Posts: 11
Re: Minimum quantity in add to cart box
« Reply #6 on: May 13, 2014, 16:59:59 pm »
Hi, I have the same issue with Virtuemart 2.5.17, Is there a fix to show the Minimum Amount Required for purchase in the pop up box when adding to cart.

http://hivisclothing.com/

cimran

  • Jr. Member
  • **
  • Posts: 51
Re: Minimum quantity in add to cart box
« Reply #7 on: February 12, 2015, 12:30:15 pm »
thank for the mod nigeldeethiopia. Works as it should.

There is one thing that would make the solution more complete. What happens at the moment is, it shows minimum quantity correctly. However, let's say product minimum buy is 3. You have to add 3, but you also have to add increments of 3, otherwise
it doesn't get added, and no error message is shown (different topic). Lucky enough for me, that's exactly what I need (shy of the problem of course) for current project, but...what I'd like to also happen is for the increment to work on increase rather than
allowing increment by 1. Basically, for the arrow up of to bring the value from 3 to 6, 9, 12 etc and not to 4, 5, 6, essentially, increasing the click by minimum order increment rather than 1.

any help would be appreciated.

Were you able to sort this? If yes then please share the way