Rank: Member
Groups: Authorized User, Developers Joined: 11/13/2018(UTC) Posts: 23
Thanks: 16 times Was thanked: 1 time(s) in 1 post(s)
|
On our previous version of Able7, we were able to disable and hide the quantity field for our software products because it is not needed and confusing to our customer when we have already created variants/options to select and add to cart. How can I disable other than setting the max quantity purchase to 1 in the additional settings section? I need to have the - 1 + box above the add to cart button to not appear on certain products. We do still need it to appear on other products.
|
|
|
|
Rank: Advanced Member
Groups: Admin, Developers, Registered, HelpDesk, Authorized User Joined: 10/5/2018(UTC) Posts: 704
Thanks: 5 times Was thanked: 113 time(s) in 112 post(s)
|
Hi IDAutomation, You need to update the following lines of code to hide the Quantity box in this case. 1- Please open the file \Website\Code\BuyProductDialog\PrepareBuyProductDialogDataAttribute.cs in a editor of your choice. 2- Find for these lines else {
hideAddToBasket = false; hideRowQuantity = false; }and replace with the following lines of code else if (product.MinQuantity == 1 && product.MaxQuantity == 1) {
hideAddToBasket = false; hideRowQuantity = true; } else {
hideAddToBasket = false; hideRowQuantity = false; }This will require a recompile in Visual Studio after you make the change, but the only file that will need to be updated is the /bin/AbleCommerce.dll file to the live website. Thanks
|
1 user thanked shaharyar for this useful post.
|
|
|
Rank: Member
Groups: Authorized User, Developers Joined: 11/13/2018(UTC) Posts: 23
Thanks: 16 times Was thanked: 1 time(s) in 1 post(s)
|
While I can make the change, I'm not a developer, so I don't understand what I'm recompiling if I'm only changing the .cs file?
|
|
|
|
Rank: Advanced Member
Groups: Administrators, Developers, Registered, HelpDesk, System, Admin Joined: 10/18/2018(UTC) Posts: 183
Thanks: 1 times Was thanked: 6 time(s) in 6 post(s)
|
Hello, Download Visual Studio Developer https://visualstudio.mic...m/free-developer-offers/Open the ac9.sln file, make the changes per the prior post. Select rebuild solution. Then copy the /bin/AbleCommerce.dll file to your development site. 2019-07-30_12-03-32.png (38kb) downloaded 0 time(s).Edited by user Tuesday, July 30, 2019 11:08:28 AM(UTC)
| Reason: Not specified |
|
1 user thanked MikeR for this useful post.
|
|
|
Rank: Member
Groups: Authorized User, Developers Joined: 11/13/2018(UTC) Posts: 23
Thanks: 16 times Was thanked: 1 time(s) in 1 post(s)
|
Originally Posted by: MikeR Open the ac9.sln file, make the changes per the prior post. Select rebuild solution. Then copy the /bin/AbleCommerce.dll file to your development site.
Mike, the only .sln I see is AbleCommerce_WAP.sln? Edited by user Tuesday, July 30, 2019 11:36:50 AM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Administrators, Developers, Registered, HelpDesk, System, Admin Joined: 10/18/2018(UTC) Posts: 183
Thanks: 1 times Was thanked: 6 time(s) in 6 post(s)
|
|
|
|
|
|
Rank: Member
Groups: Authorized User, Developers Joined: 11/13/2018(UTC) Posts: 23
Thanks: 16 times Was thanked: 1 time(s) in 1 post(s)
|
opened that file, made the change, recompiled and now I have 3128 error and 54 warnings... that can't be right :( I changed that line of code back and rebuilt and still have that many errors? Edited by user Tuesday, July 30, 2019 12:25:25 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Administrators, Developers, Registered, HelpDesk, System, Admin Joined: 10/18/2018(UTC) Posts: 183
Thanks: 1 times Was thanked: 6 time(s) in 6 post(s)
|
During the compile that's pretty normal, especially with an unconfigured Visual Studio. Backup the AbleCommerce.dll, put the new one in place and give it a test.
|
|
|
|
|
Rank: Member
Groups: Authorized User, Developers Joined: 11/13/2018(UTC) Posts: 23
Thanks: 16 times Was thanked: 1 time(s) in 1 post(s)
|
Mike, I ignored the errors and I see the date change of the .cs file, but the AbleCommerce.dll file date never changed after recompiling? I searched the drive and I do have 4 copies but all the same date and time back from July 17th.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
I just cannot get it to work/update for me :(
|
|
|
|
Rank: Member
Groups: Authorized User, Developers Joined: 11/13/2018(UTC) Posts: 23
Thanks: 16 times Was thanked: 1 time(s) in 1 post(s)
|
Started over from scratch and noticed that I had a different .NET Framework build 4.6.1, downloaded 4.6.2 and made the changes and the compile worked without any errors.
Uploaded the new DLL and it looks like it worked... (but I have that original dll safely tucked away)
|
|
|
|
Rank: Advanced Member
Groups: Administrators, Developers, Registered, HelpDesk, System, Admin Joined: 10/18/2018(UTC) Posts: 183
Thanks: 1 times Was thanked: 6 time(s) in 6 post(s)
|
Hello,
Thanks for the update, I'm glad you were able to get it sorted out! |
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The AbleCommerce Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close