Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Maeve Lander

    (@enigmaweb)

    Um… no it wouldn’t be a super easy adjustment. The plugin uses custom post types so the premalink structure is governed a bit by that. However I have seen other plugins that do it (eg NextGEN) so there would definitely be a way to do it… probably something I’d have to look into in more detail, not something I can quickly do straight away.

    I will check into it for you and report back here…

    Thread Starter christa575

    (@christa575)

    Thanks so much! Definitely not a deal breaker, your urls are clean enough as is.

    Plugin Author Maeve Lander

    (@enigmaweb)

    Nah it’s a good idea. I’ll integrate it and release an update with this and few other improvements (also the next/previous from your other thread) in a few days.

    Thanks for your input – always good to get feedback from real users.

    Plugin Author Maeve Lander

    (@enigmaweb)

    Hello… just wanted to report back on this feature….

    I worked very hard to include this in v1.4 (just released) but I ran into the problem that although I could make taxonomy customisable, it required user to reset the site permalink structure, and also it had to be set BEFORE adding products and categories. Changing taxonomy later broke the categories (products still there but categories had to be recreated and then products had to be re-assigned to said categories)

    Very frustrating….

    I made the decision that it is better not to release this feature in current state with the problem above because I think it would cause more trouble than it is worth….

    Sorry I couldn’t find a solution to this for you.

    If we are just starting out using this plugin, would it be possible to change the CTP name in the file products/wpc-product.php from its original value “wpcproducts” here:

    function wpt_wpcproduct_posttype() {
        register_post_type( 'wpcproducts',
                     array(...

    to just “products”, like this:

    register_post_type( 'products',

    so that the URLs have “…/products/<name>” instead of “wpcproducts…” ?

    I know we would need to make this change after every upgrade, but is it just this easy if we are starting out?

    Plugin Author Maeve Lander

    (@enigmaweb)

    Yes that would work. Although actually I think it appears in a couple of other places too so check through all the files…. but yeah keep in mind you’ll need to reset your permalinks, and you may run into problems on upgrade…

    @maeve,

    Thanks for the sanity check.

    I may have found another workaround that you may be able to incorporate into your next version. I was reading up on custom post types for another little project and came across this:

    https://codex.www.ads-software.com/Post_Types#URLs_of_Namespaced_Custom_Post_Types_Identifiers

    It looks like you are already using the the suggested pretty-URL method, so wouldn’t it just require changing:

    'rewrite' => array("slug" => "wpcproduct"), // Permalinks format

    to:

    'rewrite' => array("slug" => "products"), // Permalinks format

    and leaving all the internal IDs as “wpcproduct” for namespacing?

    However, I tried this on our development site, and the shortcode is generating links to individual products in that format, but when I click on them, I get a 404 page.

    I thought that maybe there was some hardcoding somewhere, but a cursory look didn’t find it. Also, if I manually change the URL back to the old slug of “/wpcproduct/…”, it gets re-written to “/products/…” and then still 404’s out!

    Any idea where this obstacle may be in the code?

    Don’t forget to reset your permalinks from the settings section. ??

    @ilovebunny,

    I reset the permalinks, and even deactivated/reactivated the plugin. Still not working.

    @maeve,

    In trying to track this down, I found the following in the debug.log:

    [09-Apr-2013 16:22:50 UTC] PHP Notice:  Undefined index: post_type in /home/example/public_html/wp-content/plugins/wp-catalogue/index.php on line 106

    I switched the slug back to ‘wpcproduct’, but I was still gettting a 404 error on individual products, although I could see them in the admin list because they were being pulled by post number.

    I tried refreshing the permalinks, but no luck. I ended up deactivating and deleting the plugin, and then reinstalling it. After one more permalink rebuild, the products came back, but now I’m back to square 1.

    Plugin Author Maeve Lander

    (@enigmaweb)

    @van-knowmad
    Would it be helpful if I sent you the development version of this plugin where I implemented functionality to customise the taxonomy structure? That way you can see how it works and identify the relevant places where wpcproduct appears? Feel free to email me privately at [email protected] and I can send you a copy. It’s not perfect – and it will have some bugs in it which existed in earlier releases when I was working on this… but ultimately it does achieve the functionality you’re after….

    One more thing: I am installing the plugin on a Multi-Site install, but only activating it on the site I need it for.

    Just to make sure, it’s not that, I installed it on my personal blog. Changed the slug, activated plugin, added dummy product, and got 404 error trying to view individual page.

    Deactivated but left installed, changed the slug back to ‘wpcproduct’, re-activated, and the individual page worked again.

    (Rebuilt permalinks at every step, just to be safe.)

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Product urls’ is closed to new replies.