Century21Stores / GLOBAL

Repository to archive any code and issues for enhancements, fixes, or new functionalities across the site (globally)
https://www.c21stores.com/
0 stars 0 forks source link

Remove Duplicate Images from PDPs #72

Closed c21hornak closed 6 years ago

c21hornak commented 7 years ago

Note: related to https://jira.tools.weblinc.com/browse/CENTURYROR-918

Several months ago we began having this issue where, in the Product QA process, it was discovered that product images attached to products in duplicate. We don't know why it started, but we do have a manual way to fix them.

The problem is that the manual fix requires someone from Adena's team to delete the duplicate image, which causes BOTH of the matching images to disappear instead of just the duplicate. Then Kate's team has to re-upload the image to WebLinc and hope it does not duplicate again (seems random).

Example PDP: https://www.c21stores.com/products/graphic-crew-sweatshirt-3

Place global code to find the duplicates images on a PDP and to show only 1 copy for each duplicating pair.

screen shot 2017-04-07 at 2 58 35 pm

c21hornak commented 7 years ago

fyi @AdenaG that I opened this.

juanmriosv commented 7 years ago

@c21hornak @AdenaG Is there an example with 2 thumbnails being duplicated at the same time?

juanmriosv commented 7 years ago

To view Go activate "THUMBNAIL DUPLICATION" release.

juanmriosv commented 7 years ago
screen shot 2017-07-31 at 4 04 13 pm
c21hornak commented 7 years ago

PASS. Approved to push to PROD.

juanmriosv commented 7 years ago

@c21hornak pushed to production

Sample

juanmriosv commented 6 years ago

Ready for QA @AdenaG

juanmriosv commented 6 years ago

Another case: https://api.production.c21.weblinc.com/products/gryslrevlvebtspk?via=59f9cd1169702d09a30001dd%2C59fa31d769702d2130024e0b

juanmriosv commented 6 years ago

@AdenaG This product in particular https://www.c21stores.com/products/gryslrevlvebtspk?via=59f9cd1169702d09a30001dd%2C59fa31d769702d2130024e0b seems to have a different issue. When I working on this ticket, the issue was creating a duplicate of the same instances (same image address too.

In the case of the above sample we have the following:

0: small_thumb.jpg?c=1508536293
1: small_thumb.jpg?c=1507913679
2: small_thumb.jpg?c=1507913684
3: small_thumb.jpg?c=1507913684
4: small_thumb.jpg?c=1507913691
5: small_thumb.jpg?c=1507913691
6: small_thumb.jpg?c=1507913701
7: small_thumb.jpg?c=1507913705
8: small_thumb.jpg?c=1507913705
9: small_thumb.jpg?c=1507913713
10: small_thumb.jpg?c=1507913719
11: small_thumb.jpg?c=1507913724

As you can see, positions 2 & 3, 4 & 5, 7, & 8 are each duplicates.

My script has removed: 2,4 and 7.

The rest are different instances of 3 different images

AdenaG commented 6 years ago

Daysi Qa'd in production and is working as expected.
Even though you can see the duplicate images momentarily, the Code is taking duplicate images on PDP and displaying only 1 copy.

See some ex: https://www.c21stores.com/products/m-italy-dk-gry?color=Dark+Grey&via=59f9cc6e69702d09a3000128%2C59f9cc7169702d09a300012e

https://www.c21stores.com/products/polo-98?color=Navy&via=59f9cc6e69702d09a3000128%2C59f9cc8569702d09a3000149

https://www.c21stores.com/products/sweater-547?color=Jade+Green&via=59f9cbd669702d09a300006f%2C59f9cbee69702d09a300008d