Site logo

Archived topic

How to change internal links from /cart-2 to /cart ?

15 replies · Started by Richard on April 29, 2020

Viewing posts 1–15 of 16

Hi,

Newbie question here.
I installed GP Premium, imported "Niche" theme and the WooCommerce plugin.
I noticed duplicate pages (I'm giving the permalink names):

/cart and /cart-2
/checkout and /checkout-2
/my-account and /my-account-2

Can someone explain why the duplication? Just curious...
(Note that I did a previous installation 24 hours before but completely removed WordPress, so I expect that isn't responsible.)

There is also:
/shop-2

To be tidy, I thought I'd like to delete the "-2" pages.

But I see that numerous items are expecting the "-2" pages.

e.g.
"VIEW CART" icon in nav bar links to /cart-2
"CHECKOUT" button (in cart page) links to /checkout-2
"RETURN TO SHOP" button (in cart page) links to /shop-2

So I can't just go and create /cart and /checkout pages unless I can specify these for the buttons.

I would be grateful if someone could help me understand:

- Why did the duplication occur?
- Why did the "-2" names occur?
- Is there a way to specify where the "VIEW CART" icon and "CHECKOUT" button link to when clicked?

Basically, how do I get everything to work without the "-2" ?

I will really appreciate any advice.

Thanks,
Richard

Hi there,

Did you install Woocommerce Plugin separately?

I did a fresh installation of Wordpress.
Then I went to Plugins in the usual way, and added the WooCommerce plugin.
(That's in addition to GP Premium plugin.)

It's possible that WooCommerce created those pages for you, then the Site Library import created them again.

You should be able to delete the duplicated ones and make sure the originals are set in your WooCommerce settings.

Let me know :)

Thanks, this worked.

I deleted the duplicate “-2” pages and pointed the WooCommerce settings at the correct pages. It only lets you specify the page title (such as Cart), not the page name (/cart, /cart-2). And the title (Cart) was the same for both, so there’s no new title to change it to. I found that the only way to get it to change was to point it to another random title and then back to “Cart” etc after deleting the unwanted duplicate.

Hard to explain but hope this makes sense!

Glad you got it sorted! :)

This happened to me too. Very frustrating. Should be a notice not to install Woocommerce first and let the site library install it instead to avoid all the duplicated pages.

Hi there,

our documentation does state that Library imports should be only added to a fresh install:

https://docs.generatepress.com/article/using-the-site-library/

But we'll take a look to see if we can make that clearer in regards to plugins being installed. Thanks for the feedback - and apologies it created some frustration.

Yes it does state that and I read that before the install but didn't know it applied to Woocommerce. Installing Woocommerce then a theme is the normal way of things, usually.

We'll see if we can make that clearer in the docs :)

I did reinstall it without no Woocmmerce preinstalled and no duplication however the install made the Woocommerce checkout page a post not a page.

https://snipboard.io/LNhbdF.jpg

Hi there,

I've never seen this.

It's very strange since Woocommerce doesn't allow a post assigned as the cart page.

Could you go to appearance > Woocommerce > settings > advanced, check if the cart page is assigned?
https://www.screencast.com/t/egDGzKxE

Let me know :)

Try it yourself? It's from a clean install. Yes it's assigned to the blog post. You really should tell people to delete the default post page Wordpress comes with before installing.

I tried it in a clean install and didn't experience this issue, we haven't had other reports on this either.

There is no need to remove the default post page from WordPress before importing a site library template from our previous experience.

Well I have reinstalled 5 times and experience this issue every time so you must not have done a clean install. This is for your theme called Target. Telling me no others have reported is really frustrating to here. Maybe know one has? I removed the default post page and now your install does not even install a checkout page for Woocommerce. It also does not install a My Account Page. That's kinda important don't you think?

https://snipboard.io/71dP8j.jpg
https://snipboard.io/o2FThq.jpg

This archived topic is closed to new replies.