WCMp Core
Tagged: shop page
-
AuthorPosts
-
-
October 25, 2021 at 6:21 PM #129559CrissParticipant
I still need to resolve one big issue, but before that I need to fix this one: the vendor page link is broken (please view attachment).
Any idea what is it caused by? -
October 25, 2021 at 6:57 PM #129564MVX Support NinjaKeymaster
Hello thank you for getting in touch with us ,
It seems like there is some plugin/theme conflict. Just to be sure, disable all the plugins except WooCommerce and WCMp and check again.
If the issue still exists, please switch to some default theme such as Twenty Sixteen and check again.
Please do keep us posted so we can help you out. -
October 27, 2021 at 1:19 PM #129622CrissParticipant
It looks like the problem is not a plugin but just one snippets I added because I wanted to redirect to my theme’s default company’s product page (which is the problem outlined in my previous post)
// REDIRECTS TO SHOP, IN ORDER TO DISABLE DEFAULT VENDOR-SHOP PAGE function my_page_template_redirect(){ if( is_tax( 'dc_vendor_shop' ) ){ $vendor_id = get_queried_object()->term_id; // Get vendor info $vendor = get_wcmp_vendor_by_term($vendor_id); if($vendor){ $redirect_url = 'https://backstage.agendadelvolo.info/Azienda/'. $vendor->page_title .'/#products'; wp_safe_redirect($redirect_url); exit(); }}} add_action( 'template_redirect', 'my_page_template_redirect', 999 );
CopyBut something is wrong, because it should redirect to the products’ tab of my company (example). Can you please help me find out what is wrong in the snippet?
-
October 27, 2021 at 6:53 PM #129714MVX Support NinjaKeymaster
Hi,
Kindly use below code and test.function my_page_template_redirect() { if( is_tax( 'dc_vendor_shop' ) ) { $vendor_id = get_queried_object()->term_id; // Get vendor info $vendor = get_wcmp_vendor_by_term($vendor_id); if($vendor) { $redirect_url = 'https://backstage.agendadelvolo.info/Azienda/'. $vendor->page_title .'/#products'; wp_redirect($redirect_url); die; } } } add_action( 'template_redirect', 'my_page_template_redirect', 1 );
CopyIf above code will not work then please share a vide regarding the issue and also share the link where do you redirect.
Regards,
-
October 28, 2021 at 8:31 PM #129734CrissParticipant
sorry but I’m not prepared to set a video at the moment.
The problem is that my theme puts the products into a specific #products tab of each company, which has a URL like mydomain/cpt/company-slug/#products (example)
But the problem is that (as in the image above) WCMP creates a URL like mydomain/vendor and then the user can choose the shop name.
This is clearly a conflict with the redirect because instead of going to the company page (by theme) it goes to the vendor page (by WCMP)… in a way, it should be $redirect_url = ‘https://backstage.agendadelvolo.info/vendor/’. $vendor->page_title .’/#products’; but I don’t know how to code.
I hope I clarified myself. -
October 28, 2021 at 8:31 PM #129735CrissParticipant
sorry but I’m not prepared to set a video at the moment.
The problem is that my theme puts the products into a specific #products tab of each company, which has a URL like mydomain/cpt/company-slug/#products (example)
But the problem is that (as in the image above) WCMP creates a URL like mydomain/vendor and then the user can choose the shop name.
This is clearly a conflict with the redirect because instead of going to the company page (by theme) it goes to the vendor page (by WCMP)… in a way, it should be $redirect_url = ‘https://backstage.agendadelvolo.info/vendor/’. $vendor->page_title .’/#products’; but I don’t know how to code.
I hope I clarified myself. -
November 28, 2021 at 5:15 PM #131184CrissParticipant
Sorry, can you follow up on this issue? I’m really stuck and I need to solve it.
-
November 29, 2021 at 2:40 PM #131219NerdySupportExpert MoumitaKeymasterThis reply has been marked as private.
-
-
AuthorPosts
The topic ‘vendor shop page link is broken’ is closed to new replies.