Rank: Advanced Member
Groups: Authorized User, Developers Joined: 2/17/2019(UTC) Posts: 909
Thanks: 3 times Was thanked: 15 time(s) in 15 post(s)
|
There is a major bug in product finder, I am not sure if this has to do with the code modification I was told to do regarding the product template. https://www.ablecommerce...ts/t260-Product-templateWhen a template has multiple selections, in this case the radio can have two choices "Analog" and "Digital", only the first choice is displayed in product finder. Hopefully you can reproduce this, this is a major problem for us. Many Thanks
|
|
|
|
Rank: Advanced Member
Groups: Authorized User, Developers Joined: 2/17/2019(UTC) Posts: 909
Thanks: 3 times Was thanked: 15 time(s) in 15 post(s)
|
To offer a better explanation, if the template has multiple values, only the first value is properly filtered by product finder. All other values are ignored.
Example: A template has the following multi-options:
A B C D
Product number one, has the value on this field set to A, B and D
Product finder role only filter on "A". This is the same problem that was occurring in the admin section after a space was added to the ",". Please note that I have noticed this after the code change.
I hope this better explanation helps, -Ray
|
|
|
|
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, I am unable to reproduce the issue or I think I need to know more details. Are you referring to the Product Finder page (site.com/Search)? Are you searching from the product finder sidebar widget on a Narrow by Keyword search field? Quote:When a template has multiple selections, in this case, the radio can have two choices "Analog" and "Digital", only the first choice is displayed in product finder. In a radio type input, you can only select one value. We can never have multiple selections for a radio type input field. Is it possible for you to take screenshots to explain it in detail? Thanks Shaharyar
|
|
|
|
Rank: Advanced Member
Groups: Authorized User, Developers Joined: 2/17/2019(UTC) Posts: 909
Thanks: 3 times Was thanked: 15 time(s) in 15 post(s)
|
Here are the steps necessary to reproduce the problem.
Version: 9.0.2.6218
#1. You will need to make the two code changes to the ProductController.cs as specified in the post, this is because when you create a product template that has multiple values, the spaces between the "," get trimmed out and it displays poorly. This should have been fixed, but it was overlooked.
#2. The second change to the ProductController.cs, corrects the problem that you do not see multiple values in the admin, after making the first change above.
#3. Once these changes are made, create a product template and assign it to a product were one of the fields consist of multiple values. Assigned t, 2 or more of the multiple values to the product, make sure that you have checked " If checked, the product search can be used to filter by this field."
#4.Click on the "product finder", which is, your domain name/Search, and you're only allowed to filter or search by the first value listed on the multi field option.
Right off the bat, you can tell there's something wrong because the counts are incorrect. If I were to undo the changes specified by support, everything would work properly. This is the identical problem that was occurring on #2, listed above, product finder is being confused because after the code changes and the new built, it is having difficulties finding multiple values because now they have the proper spaces between options.
I hope this clarifies things.
Many thanks
|
|
|
|
Rank: Advanced Member
Groups: Authorized User, Developers Joined: 2/17/2019(UTC) Posts: 909
Thanks: 3 times Was thanked: 15 time(s) in 15 post(s)
|
In reference to the above post, I have provided two pictures to better clarify the issue. The first picture shows the front end, and the second picture shows the back-end. If you look at the front end under radio market where it shows hospitality having a number count of 2, this is incorrect. There are multiple radios that have hospitality listed, in fact over 35 of them, but it's only showing 2, which are the only two where hospitality is the first value. This is a major bug for us, please this needs to be rectify. The problem with the system trimming multiple values on a product template should have been fixed this version as promised, again because of the code changes, this new problem has arisen. Thank you so much for your time, -Ray AB-Search-Error-Admin.jpg (545kb) downloaded 3 time(s). AB-Search-Error.jpg (812kb) downloaded 4 time(s).
|
|
|
|
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)
|
Thank you for the screenshots. It's the shop by feature I was missing.
I'll look into this and will reply soon.
|
|
|
|
Rank: Advanced Member
Groups: Authorized User, Developers Joined: 2/17/2019(UTC) Posts: 909
Thanks: 3 times Was thanked: 15 time(s) in 15 post(s)
|
Here's another way to look at the problem. The "before picture" shows what the front end of the website looks like, and what the table "acProductTemplateFields" shows on the backend. Please notice the number counts on the before picture when the table structure in the backend displays properly with spaces between the ",". The "after picture" shows what happens when I remove all the spaces in just one row, in other words like executing a trim(), as you can see, it displays properly in the front end if I were to remove all the spaces. Just look at the increase number counts. Again, we took care of the two problems, and now we just need to take care of the last one. Many thanks and I hope this helps, -Ray AB-Before.jpg (1,220kb) downloaded 5 time(s). AB-After.jpg (1,301kb) downloaded 5 time(s).Edited by user Thursday, May 7, 2020 8:53:26 AM(UTC)
| Reason: Not specified
|
|
|
|
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)
|
Thank you for the screenshots. It helped me understand the original issue. I have seen the backend code and it appears to me that while loading from the database our query expects the value to be comma-separated but without spaces and as in our previous fix we added spaces after the comma and saved the values to the database so the results are now invalid. The first step to fix this issue is to roll back the previous related changes and the current issue will be resolved. After that, another change will be needed to fix the original issue mentioned in a separate thread i-e Quote:2. When using a multiple listbox, it would be nice to have a spacing after the ",". It's being displayed in the product detail, right now without any space between values. To roll back the changes:1- Please open file: ~\Website\Areas\Admin\Controllers\ProductController.cs 2- Search this line Code:return string.Join(", ", values.ToArray());
3- Replace it with Code:return string.Join(",", values.ToArray());
4- Search the line Code:List<string> SelectedValue = selectedValue.Replace(", ", ",").Split(',').ToList<string>();
5- Replace it with Code:List<string> SelectedValue = selectedValue.Split(',').ToList<string>();
To fix the original issue:1- Please open file: ~\Website\Controllers\ProductController.cs 2- Search this line Code:InputValue = tf.InputValue
3- Replace it with Code:InputValue = tf.InputValue.Replace(",", ", ")
Please note that a code compile will be needed for controller file change.
|
|
|
|
Rank: Advanced Member
Groups: Authorized User, Developers Joined: 2/17/2019(UTC) Posts: 909
Thanks: 3 times Was thanked: 15 time(s) in 15 post(s)
|
Server Error in '/' Application. Runtime Error Description: An exception occurred while processing your request. Additionally, another exception occurred while executing the custom error page for the first exception. The request has been terminated. === I did exactly what I was told to do, I followed your directions to the letter. Please note I am not what I consider to be an experienced developer on the backend. I opened Visual Studio 2019 and made the changes to the ~\Website\Areas\Admin\Controllers\ProductController.cs as instructed. I then opened ~\Website\Controllers\ProductController.cs and made the changes as instructed. After a successful built, I copied the ablecommerce.dll to the web site, restarted IIS and the system exploded. Besides copying the ablecommerce.dll, are there any other files that I need to copy over after a successful built? Either way, in order to get the system working again, I had to restore from a backup. The entire site had to be restore. Please advise, -Ray Edited by user Friday, May 8, 2020 11:28:24 AM(UTC)
| Reason: Not specified
|
|
|
|
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)
|
Are you able to see the admin pages or the entire site is broken?
If you can login to admin please share any error entries from error log page.
|
|
|
|
Rank: Advanced Member
Groups: Authorized User, Developers Joined: 2/17/2019(UTC) Posts: 909
Thanks: 3 times Was thanked: 15 time(s) in 15 post(s)
|
The site was restored from a previous version so there are no error logs. could this have anything to do with the fact that the values in the database have spaces? Edited by user Friday, May 8, 2020 11:45:03 AM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Authorized User, Developers Joined: 2/17/2019(UTC) Posts: 909
Thanks: 3 times Was thanked: 15 time(s) in 15 post(s)
|
I have restored to a previous version and again follow the steps, in the ~\Website\Areas\Admin\Controllers\ProductController.cs there are two places, I only changed one where this value existed "return string.Join(", ", values.ToArray());"
I've also made the change in the ~\Website\Controllers\ProductController.cs
The site is running however, the problem is NOT FIXED, product finder does not filter on anything except the first value.
Thanks Please advise, -Ray
|
|
|
|
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)
|
Please remove the spaces from database or try saving the admin page. I-e Edit product template page.
|
|
|
|
Rank: Advanced Member
Groups: Authorized User, Developers Joined: 2/17/2019(UTC) Posts: 909
Thanks: 3 times Was thanked: 15 time(s) in 15 post(s)
|
Thank you for your reply, you have read my mind as I figured that an additional step would be necessary in the database. I have not even had my 1st cup of coffee yet, so I'm going to let this go until later today and I will issue a trim command on that particular field in the database table.
I will get back to you with my results.
This fix will be included in the next version correct?
Thank you Shari
|
|
|
|
Rank: Advanced Member
Groups: Authorized User, Developers Joined: 2/17/2019(UTC) Posts: 909
Thanks: 3 times Was thanked: 15 time(s) in 15 post(s)
|
On second thought, a trim command will not work since some of my values have spaces in-between, so search and replace will do.
|
|
|
|
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)
|
Yes most probably this fix will be included in the next release.
If you go to the edit product page and templates tab. Save the page and it will correct the values in database.
Please try to follow complete instructions/steps given in the post.
|
|
|
|
Rank: Advanced Member
Groups: Authorized User, Developers Joined: 2/17/2019(UTC) Posts: 909
Thanks: 3 times Was thanked: 15 time(s) in 15 post(s)
|
>>> If you go to the edit product page and templates tab. Save the page and it will correct the values in database. Unfortunately this is very time-consuming unless you have very few products, is just better to go in the backend and take care of it there. >>> Please try to follow complete instructions/steps given in the post. I did, but the instructions were not complete, nowhere in the instructions was I told to fix the values in the database, that is something I had to conclude by myself. Also there were two places under "return string.Join(", ", values.ToArray());" that needed to be fixed, instructions did not specify that. Regarding the "Server Error in '/' Application." problem, for those who are interested. After I did the built and I copied over the "Ablecommerce.dll" to the bin directory , I renamed the original one Ablecommerce-050820.dll, I always like to keep a copy of the old version just in case. Unfortunately Ablecommerce does not like this, not sure because it had a similar name and it confused the system, either way that is what was creating the problem. In the future since I like to save original files, I will just move them to a different directory. I hope this helps Edited by user Friday, May 8, 2020 1:31:02 PM(UTC)
| Reason: Not specified
|
|
|
|
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