Limit Product Quantity
- Kofod95
- Senior Contributor
- Posts: 748
- Joined: Sat Feb 06, 2021 7:38 pm
- Phoenix Version: 1.0.8.20
- Has thanked: 99 times
- Been thanked: 179 times
Re: Limit Product Quantity
If you install this and uninstall the core content -> shopping cart -> product listing module, you got some of it.
It does not check if there are multiple, but it hides the quantity along with the input for it, when the price is zero. Quick and easy, but should give an idea of how to make it perfect (or at least perfect enough).
//Daniel
It does not check if there are multiple, but it hides the quantity along with the input for it, when the price is zero. Quick and easy, but should give an idea of how to make it perfect (or at least perfect enough).
//Daniel
You do not have the required permissions to view the files attached to this post.
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
Here are a lot of corns: Phoenix user guide
-
ThatSweetShop
Re: Limit Product Quantity
How do I install this? I don't quite get this bit "If you install this and uninstall the core content -> shopping cart -> product listing module". I'm looking in Content Modules but don't this add-on either in the available modules.Kofod95 wrote: ↑Sun Jul 04, 2021 7:28 pm no_quantity_input_sc.zip
If you install this and uninstall the core content -> shopping cart -> product listing module, you got some of it.
It does not check if there are multiple, but it hides the quantity along with the input for it, when the price is zero. Quick and easy, but should give an idea of how to make it perfect (or at least perfect enough).
//Daniel
- Kofod95
- Senior Contributor
- Posts: 748
- Joined: Sat Feb 06, 2021 7:38 pm
- Phoenix Version: 1.0.8.20
- Has thanked: 99 times
- Been thanked: 179 times
Re: Limit Product Quantity
You need to transfer the files in the .zip to corresponding directories on your install - this can be done several ways, a couple of which are described in the user guide. When the files are in place, you can navigate to the content-modules in admin, and install the new one, and remove (or uninstall) the core one.
Software like FileZilla is recommended, but you can upload files by logging in at your host, or by making a ftp-connection through Microsoft Explorer as well.
//Daniel
Software like FileZilla is recommended, but you can upload files by logging in at your host, or by making a ftp-connection through Microsoft Explorer as well.
//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
Here are a lot of corns: Phoenix user guide
-
ThatSweetShop
Re: Limit Product Quantity
Thanks, I've got it working. The files were there but for some reason the "_QUANTITY_" tag used in language file did not match my current installation. I guess it's a version thing. I just overwrote existing files with content from supplied files (keeping existing file names) and modified the language file, and it works fine now.Kofod95 wrote: ↑Sun Jul 04, 2021 8:47 pm You need to transfer the files in the .zip to corresponding directories on your install - this can be done several ways, a couple of which are described in the user guide. When the files are in place, you can navigate to the content-modules in admin, and install the new one, and remove (or uninstall) the core one.
Software like FileZilla is recommended, but you can upload files by logging in at your host, or by making a ftp-connection through Microsoft Explorer as well.
//Daniel
*** Also, no need to check if product already in cart. It's not added even when you try a second time since it's already in cart. Thanks very much for sorting this out for me.
- Kofod95
- Senior Contributor
- Posts: 748
- Joined: Sat Feb 06, 2021 7:38 pm
- Phoenix Version: 1.0.8.20
- Has thanked: 99 times
- Been thanked: 179 times
Re: Limit Product Quantity
Glad you got it working!
I made it as a new module to keep core safe, and to allow for other modifications in the future. If you are happy with it as is, and on Phoenix 1.0.7.14+ (I think, it might be a later version that's needed) you should make the change in templates/override/includes/modules/content/shopping_cart
Override could also be any other name, depends in your template selection.
This would make it safe to update Phoenix, without the risk of loosing your modifications.
I actually thought it would increase the quantity ordered, when adding to cart from product listing or product info - you might want to test that fully by looking at checkout_confirmation, order history, the invoice and in admin/orders just to make sure
//Daniel
I made it as a new module to keep core safe, and to allow for other modifications in the future. If you are happy with it as is, and on Phoenix 1.0.7.14+ (I think, it might be a later version that's needed) you should make the change in templates/override/includes/modules/content/shopping_cart
Override could also be any other name, depends in your template selection.
This would make it safe to update Phoenix, without the risk of loosing your modifications.
I actually thought it would increase the quantity ordered, when adding to cart from product listing or product info - you might want to test that fully by looking at checkout_confirmation, order history, the invoice and in admin/orders just to make sure
//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
Here are a lot of corns: Phoenix user guide
-
ThatSweetShop
Re: Limit Product Quantity
I'll do a bit more testing as you suggested. ThanksKofod95 wrote: ↑Mon Jul 05, 2021 6:12 am Glad you got it working!
I made it as a new module to keep core safe, and to allow for other modifications in the future. If you are happy with it as is, and on Phoenix 1.0.7.14+ (I think, it might be a later version that's needed) you should make the change in templates/override/includes/modules/content/shopping_cart
Override could also be any other name, depends in your template selection.
This would make it safe to update Phoenix, without the risk of loosing your modifications.
I actually thought it would increase the quantity ordered, when adding to cart from product listing or product info - you might want to test that fully by looking at checkout_confirmation, order history, the invoice and in admin/orders just to make sure
//Daniel
-
ThatSweetShop
Re: Limit Product Quantity
You were right about testing if product is added elsewhere. It is added... This happens only if the product attribute i.e color or size is different from one added to cart previously. Please can you update code to check if that product is in cart already not to add it again? Many thanksKofod95 wrote: ↑Mon Jul 05, 2021 6:12 am Glad you got it working!
I made it as a new module to keep core safe, and to allow for other modifications in the future. If you are happy with it as is, and on Phoenix 1.0.7.14+ (I think, it might be a later version that's needed) you should make the change in templates/override/includes/modules/content/shopping_cart
Override could also be any other name, depends in your template selection.
This would make it safe to update Phoenix, without the risk of loosing your modifications.
I actually thought it would increase the quantity ordered, when adding to cart from product listing or product info - you might want to test that fully by looking at checkout_confirmation, order history, the invoice and in admin/orders just to make sure
//Daniel
- Kofod95
- Senior Contributor
- Posts: 748
- Joined: Sat Feb 06, 2021 7:38 pm
- Phoenix Version: 1.0.8.20
- Has thanked: 99 times
- Been thanked: 179 times
Re: Limit Product Quantity
Only guessing now, but I think that the best solution would be to override the shopping_cart class, which could also make my previous change redundant. Else hooks would be needed to check and alter the quantity during the checkout-process as well as in the cart.ThatSweetShop wrote: ↑Mon Jul 05, 2021 9:30 am Please can you update code to check if that product is in cart already not to add it again? Many thanks![]()
You are better off contacting one of the certified developers for this, as whatever I could do (asuming I would succeed) would be too messy. They might also have a much better idea in general.
Sorry I can't get you all the way on this one - I'm not a developer, but just someone stubborn enough to try the same thing enough time to sometimes get it to work
//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
Here are a lot of corns: Phoenix user guide
-
ThatSweetShop
Re: Limit Product Quantity
Thanks a lot, you got me on my way at least. Much appreciated!Kofod95 wrote: ↑Mon Jul 05, 2021 3:36 pmOnly guessing now, but I think that the best solution would be to override the shopping_cart class, which could also make my previous change redundant. Else hooks would be needed to check and alter the quantity during the checkout-process as well as in the cart.ThatSweetShop wrote: ↑Mon Jul 05, 2021 9:30 am Please can you update code to check if that product is in cart already not to add it again? Many thanks![]()
You are better off contacting one of the certified developers for this, as whatever I could do (asuming I would succeed) would be too messy. They might also have a much better idea in general.
Sorry I can't get you all the way on this one - I'm not a developer, but just someone stubborn enough to try the same thing enough time to sometimes get it to work
//Daniel
- Cary
- Member
- Posts: 34
- Joined: Fri Mar 12, 2021 9:36 pm
- Phoenix Version: v1.0.9.1
- Has thanked: 3 times
- Been thanked: 3 times
Re: Limit Product Quantity
Another thought... I'd try and use Discount Code for a single use on a single product. Then highlight in the description to use the discount code for one free item per customer. Keeps the shipping cost (which I think you wanted) but allows 100% discount on a specified product, one time per customer. Or that's at least how the osC version worked. I haven't installed discount codes for Phoenix yet.
Cary
Cary
- Cary