Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › Edit shop page
- This topic has 9 replies, 2 voices, and was last updated 4 years, 6 months ago by Sushobhan.
- AuthorPosts
- May 7, 2020 at 2:07 am #127720iain.sandisonParticipant
Love this but how do i edit the shop page?? I want customers to pick a store and shop through that retailer not browse a category of items with numerous listed sellers.
Ive built store_list page and directing customers to their chosen store through there but then when you select a product and view in single item page it shows the breadcrumb link for the whole shop and that vendors store is forgotten - May 7, 2020 at 3:13 pm #127954SushobhanKeymaster
Hi,
Previously I posted a reply with a snippet but it was not working. So I removed my reply. I’ll do some more research. The problem is WooCommerce doesn’t support this structure, see here- https://wordpress.org/support/topic/woocommerce-product-permalinks-custom-base/
Will Let you know.
Thanks! - May 7, 2020 at 3:45 pm #127962iain.sandisonParticipant
Hi thank you so much for your efforts, its the only sticking point im having really so will look forward to your reply, thanks again appreciate it
- May 7, 2020 at 7:59 pm #128068SushobhanKeymaster
Hi,
Step 1: Please use the following snippet for this-add_filter( 'post_type_link', function( $post_link, $post, $leavename, $sample ) { if ( 'product' != get_post_type( $post ) ) return $post_link; $authordata = get_userdata( $post->post_author ); $author = $authordata->user_nicename; $post_link = str_replace( '%shop_name%', $author, $post_link ); return $post_link; }, 50, 4 ); add_action( 'init', function() { add_rewrite_rule( '(.?.+?)/product/?(.?.+?)/?$', 'index.php?author_name=$matches[1]&post_type=product&product=$matches[2]', 'top' ); } );
Add this code to your child theme’s functions.php
In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/
Step 2: Go to wp-admin >> Settings >> Permalinks, under Product permalinks section choose Custom base and input this-/%shop_name%/product/
Let me know how this goes.
Thanks! - May 8, 2020 at 1:20 am #128169iain.sandisonParticipant
Couldnt see any difference im afraid,
Still links are
Home-mystore-shop1-alcohol-lagersThen when i click a lager product it goes to single item page and links change to
Home-alcohol-lagers
So if a customer clicks alcohol tab thinking theyll go back to vendor it still goes to the shop page where catergories are and showing items from all sellers
Is there a different way to do it? Am i doing it wrong or is woo commerce based more about the full shop rather than the vendors ?
Thanks for your help again
- May 8, 2020 at 3:16 pm #128360SushobhanKeymaster
Hello,
I have gone through the other topic you have posted https://wclovers.com/forums/topic/links-breadcrumbs-on-shop-page/ . It helps me better understanding your requirement.
Sorry but, this can’t be done that easily. I mentioned earlier WooCommerce by default doesn’t allow this kind of permalink structure.
It will take time and effort. The last code I provided will not do. Please remove it to avoid any wrong redirections.
You will need custom coding to make this possible.
Thank You! - May 8, 2020 at 11:41 pm #128552iain.sandisonParticipant
Well thanks for trying appreciate it, im a bit disappointed woo commerce doesnt have that option but there must be a way to do something maybe different. See the idea was a customer could pick a store vendor, shop with them browsing through all the categories they have adding to cart. Then they could visit another seller and browse their products adding them to cart also and then completing one checkout process.
Example checkout basketStore 1
Bread £1.00
Milk £1.20Store 2
Hammer £5.00Shipping £3.00
Total £10.20Does that kind of make sense?
- May 9, 2020 at 11:16 am #128713SushobhanKeymaster
It’s hard to tell what will work best for the customers! Also, the frontend UI/UX depends on the business model as well. Like for Amazon, we don’t even care from which vendor we are buying the items as long as its “Fulfilled by Amazon”. There we mostly rely on search and similar item suggestions while making purchases. On the other hand in Etsy or Zatista, individual vendors/artists get more credits from their buyers.
I agree, the breadcrumb structure you suggested make sense, as it makes navigation much easier. But, it will require some customization to have that inside WooCommerce.
Thank You! - May 10, 2020 at 1:07 am #128944iain.sandisonParticipant
Hi thanks for your reply, how would i go about getting a bit custom Code help?
- May 12, 2020 at 8:59 am #129828SushobhanKeymaster
Hi,
Please contact us here for this purpose- https://wclovers.com/setup-guidance/. After submitting the form please let me know here.
Thank you!
- AuthorPosts
- You must be logged in to reply to this topic.