• Resolved gloofactory

    (@gloofactory)


    I’ve inherited a site that uses WooCommerce. While upgrading it, I noticed that the permalinks for several pages are of the form https://domain.org/about-us/<page-name>.php. So, for example, the permalink for the Cart and Checkout pages are: https://domain.org/about-us/cart.php and https://domain.org/about-us/checkout.php, respectively.

    This doesn’t make any sense to me, and so I’d like to change it. However, on the page that appears at Settings -> Permalinks, under the heading that reads Product Permalinks, the Shop base radio button has a value of https://domain.org/about-us/sample-product/, implying that the Shop base setting is set to https://domain.org/about-us.

    How can I modify the Shop base URL and move WooCommerce related pages out from under this intermediate path of about-us? I cannot find the setting for the base Shop URL in the WP/WooCommerce interface.

    Diagnostics:

    
    ### WordPress Environment ###
    
    WC Version: 5.5.1
    REST API Version: ? 5.5.1
    WC Blocks Version: ? 5.3.2
    Action Scheduler Version: ? 3.2.1
    WC Admin Version: ? 2.4.1
    Log Directory Writable: ?
    WP Version: 5.7.2
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: ?
    WP Cron: ?
    Language: en_US
    External object cache: –
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: 7.3.28-1+ubuntu16.04.1+deb.sury.org+1
    
    ### Active Plugins (25) ###
    
    FiboSearch - AJAX Search for WooCommerce: by FiboSearch Team – 1.12.0
    WP fail2ban: by Charles Lecklider – 4.3.0.9
    LayerSlider WP: by Kreatura Media – 6.11.1
    BackUpWordPress: by XIBO Ltd – 3.11
    Classic Editor: by WordPress Contributors – 1.6
    Contact Form by BestWebSoft: by BestWebSoft – 4.2.3
    Easy WP SMTP: by wpecommerce
    alexanderfoxc – 1.4.7
    
    reCaptcha by BestWebSoft: by BestWebSoft – 1.62
    Anti-Malware Security and Brute-Force Firewall: by Eli Scheetz – 4.20.72
    Insert Pages: by Paul Ryan – 3.6.1
    Maintenance: by WebFactory Ltd – 4.03
    Regenerate Thumbnails: by Alex Mills (Viper007Bond) – 3.1.5
    Simple Banner: by Ryan Petersen – 2.10.3
    WooCommerce Table Rate Shipping by Mangohour: by mangohour – 1.2.1
    Open Graph and Twitter Card Tags: by Webdados – 3.1.1
    WooCommerce Advanced Bulk Edit: by George Iron – 4.5
    WooCommerce Advanced Free Shipping: by Jeroen Sormani – 1.1.4
    Woocommerce CSV Import: by Allaerd Mensonides – 3.3.6
    Print Invoice & Delivery Notes for WooCommerce: by Tyche Softwares – 4.6.3
    WooCommerce Sequential Order Numbers: by SkyVerge – 1.9.5
    WooCommerce - StampscomEndicia Integration: by Stamps.comEndicia – 2.0.0
    WooCommerce TM Extra Product Options: by themeComplete – 5.1
    WooCommerce: by Automattic – 5.5.1
    Yoast SEO: by Team Yoast – 16.7
    WP fail2ban: by Charles Lecklider – 4.3.0.9
    
    ### Settings ###
    
    API Enabled: ?
    Force SSL: ?
    Currency: USD ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)
    
    Connected to WooCommerce.com: ?
    
    ### WC Pages ###
    
    Shop base: #2704 - /
    Cart: #2780 - /about-peace-supplies/cart/
    Checkout: #2786 - /about-peace-supplies/checkout/
    My account: ? Page not set
    Terms and conditions: ? Page not set
    
    ### Theme ###
    
    Name: One Child theme
    Version: 1.8
    Author URL: https://thehappybit.com
    Child Theme: ?
    Parent Theme Name: One
    Parent Theme Version: 1.8.13
    Parent Theme Author URL: https://justevolve.it/
    WooCommerce Support: ?
    
    ### Templates ###
    
    Overrides: one/woocommerce/checkout/form-checkout.php
    one-child/woocommerce/loop/add-to-cart.php
    one/woocommerce/single-product/share.php
    
    • This topic was modified 3 years, 7 months ago by gloofactory. Reason: formatting
    • This topic was modified 3 years, 7 months ago by gloofactory. Reason: More formatting
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support kellymetal a11n

    (@kellymetal)

    Hi there,

    That certainly is strange! Generally, the site address would just be determined by the settings under Settings > General (below), and then product/category links would be set in the Permalinks page you were looking at.


    Link to image: https://d.pr/i/s8yLe0

    If you open up the Cart and Checkout pages, do you have them set with a Parent page in the Page Attributes section?

    parent page
    Link to image: https://d.pr/i/lHZLsB

    Perhaps they got set as children of the About Us page?

    Thread Starter gloofactory

    (@gloofactory)

    Thanks for your reply, @kellymetal. Yes, the pages (Cart, Checkout, etc) have a parent, but that Parent is the default homepage that is mapped to the root of the domain (https://domain.org). That’s why this is so puzzling…there is no intermediate node/ancestor on this tree that’s visible in the administrative UI.

    While testing, I found the following. When I set the Parent Page to…

    • No Parent: the page permalink is right under the root of the domain
    • Homepage: the page permalink includes the intermediate and unwanted “about-us” path segment
    • Store Page: the page permalink includes both the unwanted ‘about-us’ and the ‘store’ directory/segment (eg https://domain.org/about-us/store/checkout)

    But both WP_HOME and WP_SITEURL are defined in wp-config.php as https://domain.org and that’s the way it appears in the General Settings.

    Would you happen to know where this might be in the backend? If I could get a table name before I start looking around the database, it would be helpful.

    Plugin Support kellymetal a11n

    (@kellymetal)

    Hi there,

    No Parent: the page permalink is right under the root of the domain

    Wasn’t this the goal? To remove any intermediate part and have the page right under the root domain — i.e. https://domain.org/cart?

    On all my personal sites and most sites I see, the WooCommerce pages are set without any Parent page. When I change it to be the child of a different page, I see that it adds that page’s slug to the URL.

    Was your goal different from the https://domain.org/cart example? If so, what were you trying to set it as?

    Thread Starter gloofactory

    (@gloofactory)

    The goal is to understand why permalinks contain about-us and why the Shop base URL seems to as well. As I mentioned in my earlier post:

    However, on the page that appears at Settings -> Permalinks, under the heading that reads Product Permalinks, the Shop base radio button has a value of https://domain.org/about-us/sample-product/, implying that the Shop base setting is set to https://domain.org/about-us.

    Ideally, the cart and checkout pages would be under the Shop base URL, and so my main concern is correcting the issue with the Shop base.

    Plugin Support abwaita a11n

    (@abwaita)

    Hi @gloofactory,

    Just checking, from your SSR, I saw that:

    ### WC Pages ###
    
    Shop base: #2704 - /
    Cart: #2780 - /about-peace-supplies/cart/
    Checkout: #2786 - /about-peace-supplies/checkout/

    * Something is not right here with the Shop base. Could you go to WP-Admin → Pages and see if you can find the Shop page and modify its URL slug to something else (shop is fine), so that the end result is like mysitedomain/shop (without a parent page).
    * Also, it seems that you selected /about-peace-supplies/ to be the parent page of your cart and checkout pages, you will want to remove the parent page for these pages as well.

    Let us know how it goes.
    Thanks.

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Since it’s been a while since we last heard back from you, I’m going to mark this thread resolved.

    Hopefully, you were able to find a solution to your problem! If you have further questions, please feel free to open a new topic.

    Cheers! ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Base URL for Shop and permalinks for WooCommerce pages’ is closed to new replies.