How to change "Products" page to "Donate"

Hello,

My website is: https://adorermissionarysistersofthepoor.org/products/ and I want to change /products to /donate. How can I go about doing this?

Thanks so much for your help!
Comments
  • fc_adamfc_adam FoxyCart Team
    @adorersisters,

    You can indeed change the "products" slug to something else within FoxyShop. It will require adding an extra line of code to your wp-config.php file - we have details on it here: http://www.foxy-shop.com/faqs/can-i-change-the-slug-from-products-to-something-else/

    I hope that helps!
  • Thank you! I couldn't think of the word "slug" to search for the help page. :)
  • Hi Adam,

    I added that line to the wp-config.php file and I got a 404 error. These pages seem similar to my issue but I don't know how to resolve it still...
    https://forum.foxycart.com/discussion/9785/foxyshop-product-pages-404 - adding the line provided still gives 404
    https://github.com/woocommerce/woocommerce/issues/15237 - here of note is my permalinks page doesn't look the same as the screenshot in this thread. I don't have any Foxy specific permalink options and I don't know if I'm supposed to.

    I remove the line define('FOXYSHOP_PRODUCTS_SLUG','Donate'); and it works as expected with no 404.

    Thanks,
    Jill
  • fc_marijafc_marija FoxyCart Team
    Hi @adorersisters -

    This article goes a little further in that you need to makes sure you put the define('FOXYSHOP_PRODUCTS_SLUG','something-else'); before the require_once(ABSPATH . 'wp-settings.php'); line. Can you double-check that? Here's a link to the article: http://www.foxy-shop.com/documentation/advanced-settings/
  • Hi,

    This is the end of my wp-config.php file:

    /* That's all, stop editing! Happy blogging. */
    //** 1/20/2018 edit to change Foxy "Product" slug to "Donate" */
    define('FOXYSHOP_PRODUCTS_SLUG','Donate');

    /** Absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__) . '/');

    /* Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');


    Should the 3rd line be further down?

    Thanks,
    Jill
  • fc_adamfc_adam FoxyCart Team
    @adoresisters,

    Thanks for posting your code. That should be fine - I copied that same customisation into my own test store and it all worked fine.

    Could I confirm with you what page you were seeing the 404 error on? All pages, or just some specific URL's?
  • The code is not there now since I can't have it giving a 404 error that prevents us from receiving donations.

    Over the weekend, when I was testing it, it was giving the error on both the https://adorermissionarysistersofthepoor.org/products and https://adorermissionarysistersofthepoor.org/donate pages.

    Thanks,
    Jill
  • fc_adamfc_adam FoxyCart Team
    @adorersisters,

    Thanks for confirming. One more question - could I confirm the version of FoxyShop and Wordpress that you're running?

    Also, while it shouldn't be an issue - you could try setting the url to the lowercase slug like this:

    define('FOXYSHOP_PRODUCTS_SLUG','donate');

    It worked for me in the form you had it already though - I'm really confused why it doesn't work for you!
  • Hi Adam,

    I'm using WP 4.9.2, Themify Flat 2.6.6 and FoxyShop 4.7.3

    Thanks,
    Jill
  • fc_adamfc_adam FoxyCart Team
    @adoresisters,

    Thanks for confirming that for me. I wonder if there is a permalink redirect that is getting in the way of your set up here... I was just able to experience the 404 error, and clearing the permalinks solved it for me.

    Could you try the following:

    1. Re-apply the define('FOXYSHOP_PRODUCTS_SLUG','donate'); code in the wp-config.php file. Note that it's a lowercase "d" there.
    2. In the WP admin, navigate to "settings" > "permalinks", and save the page (without making any changes to the settings available on the page.

    If you try the site then, loading the donate page as https://adorermissionarysistersofthepoor.org/donate it should hopefully work for you.
  • Hi Adam,

    That did work, thank you. Now how can I get the page itself to say "Donate" instead of Products and when you're within an item, it say "<< Back to Donate" instead of "<< Back to Products"?

    Thank you again for your help!
    Jill
  • fc_adamfc_adam FoxyCart Team
    edited February 15
    @adoresisters,

    I'm glad that worked for you!

    To change the "Products" language in the title of the all products page and also in the breadcrumbs, you'll need to copy some of the FoxyShop plugin theme files into your own theme folder to edit. You'll find these files within the themefiles folder of the FoxyShop plugin.

    Specifically, you'll want to copy the foxyshop-all-products.php file and edit this line to change the title:
    echo '<h1 id="foxyshop_category_title">Products</h1>'."\n";

    For the breadcrumbs, you'll copy the foxyshop-single-product.php file to the theme folder and edit this line, changing the "Products" text accordingly:
    foxyshop_breadcrumbs(" &raquo; ", "&laquo; Back to Products");
Sign In or Register to comment.