logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
ray22901031  
#1 Posted : Friday, May 31, 2024 2:01:56 PM(UTC)
ray22901031

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 product templates can be difficult to work with, especially after modifications and changes. These changes include adding new fields and sorting these fields to specific locations.

Any product that had the template attached before the modification will show the fields without the new sort order. To fix this, one has to remove the product template, acknowledge that the data will be deleted, re-add the product template to the item, and re-enter the data.

In a future update, it would be beneficial to have a method that allows the templates to reconfigure themselves when working on a specific product. This could be achieved by implementing a button that, when clicked, would automatically remove the template, save the data, re-enter the template, and re-enter the data.

This would save a tremendous amount of time.

PS: You could also apply this globally for categories, so everything in that category would be refreshed with the new fields and sorting.

Just my thoughts.

Edited by user Friday, May 31, 2024 2:03:05 PM(UTC)  | Reason: Not specified

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

Katie S  
#2 Posted : Friday, May 31, 2024 10:47:31 PM(UTC)
Katie S

Rank: Advanced Member

Groups: System, Administrators, Developers, Registered, HelpDesk
Joined: 10/29/2018(UTC)
Posts: 472

Thanks: 4 times
Was thanked: 34 time(s) in 33 post(s)
Thanks Ray. I always appreciate your suggestions. We will definitely look into this improvement.
Thanks for your support!

Katie
Secure eCommerce Software and Hosting
Katie S  
#3 Posted : Monday, June 3, 2024 4:13:14 PM(UTC)
Katie S

Rank: Advanced Member

Groups: System, Administrators, Developers, Registered, HelpDesk
Joined: 10/29/2018(UTC)
Posts: 472

Thanks: 4 times
Was thanked: 34 time(s) in 33 post(s)
Hi Ray,

I'm trying to understand how to reproduce the issue here.

What I've done is created a new product template.

I added Merchant fields with Choice 1, 2, and 3 - in that order.
Then I added Customer fields with the same choices and ordering.

Assigned this to a product. Confirmed the display order in both admin and retail. Works fine.

Went back to the Product template. Added a 4th choice and reordered them all to 4, 3, 2, 1.

Checked the product without making any changes. Both retail and admin are displaying with the new choice and new ordering.

Can you help me understand the issue, or what I'm missing?
Thanks for your support!

Katie
Secure eCommerce Software and Hosting
ray22901031  
#4 Posted : Monday, June 3, 2024 5:54:42 PM(UTC)
ray22901031

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)
Fortunately, this process is straightforward and easily reproducible.

Please look at the picture called before. I am going to go into the template, or at least one of the product templates since this product has a few, and add a new choice called "IS THIS ITEM RED?"

After modifying the product template and inserting the new choice, I also bring this particular choice all the way to the very top, as opposed to the very bottom, where new choices are created.

I go back to the product itself and the back end, and under the template, I enter a value into the new choice. Please look at the picture called after.

Please remember that I took that particular choice and moved it all the way to the top, but it still displays at the bottom. It will only display at the top when I remove that particular template and re-add it. Only then will the new sorting order work.

It just would be nice to have some type of reconfiguration option as opposed to removing the template, accepting that the information will be deleted, re-adding to the template, re-entering all previous choicesthe choices, and saving.

previous choices

Many Thanks


BPR40-Before.jpg (174kb) downloaded 2 time(s).
BPR40-After.jpg (191kb) downloaded 0 time(s).

Edited by user Monday, June 3, 2024 5:56:43 PM(UTC)  | Reason: Not specified

Katie S  
#5 Posted : Monday, June 3, 2024 6:21:50 PM(UTC)
Katie S

Rank: Advanced Member

Groups: System, Administrators, Developers, Registered, HelpDesk
Joined: 10/29/2018(UTC)
Posts: 472

Thanks: 4 times
Was thanked: 34 time(s) in 33 post(s)
Got it. I was using the Radio type for choices, so missing the part about actually entering data for the product.

Thanks for taking the time to help me understand.
Thanks for your support!

Katie
Secure eCommerce Software and Hosting
ray22901031  
#6 Posted : Monday, June 3, 2024 6:29:09 PM(UTC)
ray22901031

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)
It seems that the radio templates are inserted into the database as a one-time shot. They work has a snapshot from that particular date and will not reflect any changes in values or sorting after the fact. I'm asking instead of deleting the template and re-entering it, to have the means to refresh it and bring it up to its current values for that date.

That's another way to frame it.

-Ray

PS: To be a little bit more clear, values are indeed reflected only when the template is modified and saved, but the new sorting order is not.

Edited by user Monday, June 3, 2024 6:31:14 PM(UTC)  | Reason: Not specified

Katie S  
#7 Posted : Wednesday, June 5, 2024 11:38:43 AM(UTC)
Katie S

Rank: Advanced Member

Groups: System, Administrators, Developers, Registered, HelpDesk
Joined: 10/29/2018(UTC)
Posts: 472

Thanks: 4 times
Was thanked: 34 time(s) in 33 post(s)
Hi Ray,

I see the issue. You're right, it's easily reproduced, but the sorting is only a problem when there is data entered for the template options. As you said, this data is populating the database as-is without reflecting the sorting of the template fields.

On the product editing > Templates page, the fields are re-sorted properly when a new template field is added, or if any existing field is resorted. This just isn't being reflected on the retail page.

It seems to me that this should be an issue we can fix without having to drop and re-add the template.

I'll get this issue reported. Thank you!
Thanks for your support!

Katie
Secure eCommerce Software and Hosting
Katie S  
#8 Posted : Friday, June 7, 2024 10:57:45 AM(UTC)
Katie S

Rank: Advanced Member

Groups: System, Administrators, Developers, Registered, HelpDesk
Joined: 10/29/2018(UTC)
Posts: 472

Thanks: 4 times
Was thanked: 34 time(s) in 33 post(s)
For reference, the issue id is #2274
Thanks for your support!

Katie
Secure eCommerce Software and Hosting
nadeem  
#9 Posted : Wednesday, June 12, 2024 6:49:35 AM(UTC)
nadeem

Rank: Advanced Member

Groups: Administrators, Developers, Registered, HelpDesk, Authorized User, Admin, System
Joined: 10/11/2018(UTC)
Posts: 110

Thanks: 19 times
Was thanked: 18 time(s) in 18 post(s)
Hi Ray,

Just in case you want to apply the fix.
Open the retail Controllers/ProductController.cs

Locate the following line of code inside ProductCustomFieldsDialog method

Code:
TemplateFields = product.TemplateFields.Where(tf => !string.IsNullOrEmpty(tf.InputValue) && tf.InputField.IsMerchantField)



and replace with


Code:
TemplateFields = product.TemplateFields.Where(tf => !string.IsNullOrEmpty(tf.InputValue) && tf.InputField.IsMerchantField)
.OrderBy(tf => tf.InputField.OrderBy)
Users browsing this topic
Guest
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.