News:

Support the VirtueMart project and become a member

Main Menu

Data Validation for Product Detail Quantity Field

Started by romatvirtue, June 24, 2013, 05:27:59 AM

Previous topic - Next topic

romatvirtue

Dear Virtuemart,

I am playing with VM product details page and noticed on your demo as well as on my copy that when user enters "0" in the quantity field, system still displays the message that product has been added to the cart. Is there any way to display a message saying that "quantity entered has to be more than 0" or something like that...?

Please help.

Thanks so much.

romatvirtue

Anyone? Please? This seams to me a must thing to have. I just don't know how to fix this.

Thanks.

PRO

what version are you trying?


does the product have a minimum of greater than 0 set?


romatvirtue

Hello and thanks for getting back to me. I really appreciate that. I am using 2.0.20b version. I did not personally set anything. Could you please explain how and where (path to the file) to set it?

Thank you in advance.

romatvirtue

... to add.. when the quantity is set to "0" and user clicks on "Add to Cart" it displays that the product was added. I think that's wrong.

PRO

Quote from: romatvirtue on June 26, 2013, 22:26:59 PM
... to add.. when the quantity is set to "0" and user clicks on "Add to Cart" it displays that the product was added. I think that's wrong.

are you using template overrides?


romatvirtue

Quote from: PRO on June 27, 2013, 01:26:24 AM
Quote from: romatvirtue on June 26, 2013, 22:26:59 PM
... to add.. when the quantity is set to "0" and user clicks on "Add to Cart" it displays that the product was added. I think that's wrong.

are you using template overrides?

Well, I do have an override which is part of the template I use. This doesn't matter, I think. The reason I say that is because even on VM demo site, when user enters "0," system displays a popup saying that the product was added to the cart. And of course, if you check the cart, nothing was added, because the quantity was "0." To me this is a small bug which we have to correct.

Is there any way to through a JavaScript code to display an alert message when user enters "0" and clicks on "Add to Cart" button?

jenkinhill

In the next version (currently at 2.0.21g) the popup shows no added to cart - it shows a continue shopping link.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

romatvirtue

Quote from: jenkinhill on June 27, 2013, 10:31:05 AM
In the next version (currently at 2.0.21g) the popup shows no added to cart - it shows a continue shopping link.

Thank you for the reply. When is next version coming out, if I may ask? And how do I go about this right now?

Also could you please give your advice as far as making updates. When we make some changes to the code it get overridden after update. Now, I know that it's highly recommended to make updates due to the security concerns. How do I keep all my changes in place after the upgrade?


Thank you in advance.

jenkinhill

I guess 2.0.22 will be released within the next few days. A list of fixes/improvements is in http://forum.virtuemart.net/index.php?topic=115877.0

Code changes should only be made to templates or to css - and by using overrides these do not get overwritten during an update.

Changes to the core code are not supported (core functions should be changed if required by using plugins) so any core changes do get overwritten.  In any case the advice is always to try version upgrades on backup copy of the site first to check that the store functions OK.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

romatvirtue

Quote from: jenkinhill on June 29, 2013, 19:28:47 PM
I guess 2.0.22 will be released within the next few days. A list of fixes/improvements is in http://forum.virtuemart.net/index.php?topic=115877.0

Code changes should only be made to templates or to css - and by using overrides these do not get overwritten during an update.

Changes to the core code are not supported (core functions should be changed if required by using plugins) so any core changes do get overwritten.  In any case the advice is always to try version upgrades on backup copy of the site first to check that the store functions OK.

Great! I appreciate it. Thank you very much.

romatvirtue

Quote from: jenkinhill on June 27, 2013, 10:31:05 AM
In the next version (currently at 2.0.21g) the popup shows no added to cart - it shows a continue shopping link.

Hello! In the meantime, do you think it's possible to have a JavaScript alert popup to check the quantity? Could you please explain how to implement that?

Thank you in advance.

jenkinhill

I am not a coder.... But how many idiots do you know who would try to add nothing to the cart?
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

romatvirtue

Quote from: jenkinhill on July 02, 2013, 18:21:31 PM
I am not a coder.... But how many idiots do you know who would try to add nothing to the cart?

I am a 100% with you on that, but my client wants it. What can I do?:) So... I guess I was hoping that someone else might have had an issue with this.

Thanks for getting back to me on this.

romatvirtue

Quote from: jenkinhill on June 29, 2013, 19:28:47 PM
I guess 2.0.22 will be released within the next few days. A list of fixes/improvements is in http://forum.virtuemart.net/index.php?topic=115877.0

Code changes should only be made to templates or to css - and by using overrides these do not get overwritten during an update.

Changes to the core code are not supported (core functions should be changed if required by using plugins) so any core changes do get overwritten.  In any case the advice is always to try version upgrades on backup copy of the site first to check that the store functions OK.

Jenkinhill,

Hi! I just updated VM. So for products added to the cart, when user enters "0" it shows "0" in the pop up. Where do I add a custom message to replace "0?"

Thank you in advance.