Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shopify Product Slugs Not Updating / Re-Syncing #87

Open
sm9 opened this issue Nov 3, 2023 · 6 comments
Open

Shopify Product Slugs Not Updating / Re-Syncing #87

sm9 opened this issue Nov 3, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@sm9
Copy link

sm9 commented Nov 3, 2023

Description

Before installing the Shopify plugin, I had a section named 'Shop Entries', and these contained all my products. When updating the settings for the Shopify products for the first time, I gave them the same Product URI Format as the Shop Entries section. When I synced my products from Shopify, all the Shopify products in my Craft install have a "-2" at the end of the slug, e.g. /shop/product-name-2.

I have tried changing the Shop Entries URI format to something different to remove the clashing slugs, but that didn't change anything with the Products. I tried clicking the Shopify Sync button in case that updated the product slugs, but that didn't change anything either. Is there a way to update these Shopify product slugs at all? Thanks.

Additional info

  • Craft version: 4.5.9
  • PHP version: 8.0
  • Database driver & version: MySQL 8
  • Plugins & versions: Shopify 4.0.0
@sm9 sm9 added the bug Something isn't working label Nov 3, 2023
@sm9
Copy link
Author

sm9 commented Nov 3, 2023

Just a quick follow-up on this - I noticed that the slug for each product is stored within the slug row of the craft_elements_sites table, so I tried changing the slug for one product in here, and it seemed to work okay, so I don't mind fixing this duplicate slug issue by doing the same for the rest of the products. But are there any consequences to doing this that I should be aware of? Thanks.

@lukeholder
Copy link
Member

You can fix it in that table as long is it is unique.

I'll look into allowing edits on the front end.

@sm9
Copy link
Author

sm9 commented Nov 4, 2023

Thanks Luke, I'll fix this in that table for now then. There's only 9 products and I'll make sure the slug is unique. It'd be great if a native way of editing this is added in the future of course, so thanks for looking into this.

@siebird
Copy link

siebird commented Jan 15, 2024

We're running into a similar issue. We have two entries for the same Shopify product in Craft, thus giving us -2 with slugs. Not able to delete one either.

CleanShot 2024-01-15 at 11 59 00

@lukeholder
Copy link
Member

You are getting duplicate Shopify product elements? Re-sycning all from the command line doesn't fix it?

@siebird Can you send your DB dump, composer.json, composer.lock to [email protected] so we can look into this one?

Thanks.

@dyerc
Copy link

dyerc commented Sep 17, 2024

I just encountered this issue or a very similar one. I updated the slug/url handle for a product in Shopify and despite performing a full resync, Craft still displays the product on its original URL. In the admin area, the updated slug is displayed but not used by Craft to display the page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants