- This topic has 3 replies, 3 voices, and was last updated 3 years, 7 months ago by
Sangita Support Squad.
-
AuthorPosts
-
-
November 10, 2022 at 1:33 AM #146024
nathan
ParticipantHi
so ive been using the old WCMp plugin for a fair few years now. During that time, i’ve created my own custom Vendor archive and vendor info page following the documentation. Since updating to MultivendorX, these pages are now broken are throwing multiple errorsI use add_filter(‘wcmp_load_default_vendor_list’, ‘__return_true’); to override page templates.
The old override
/theme/dc-product-vendor
/shortcode
/vendor_lists.php
taxonomy-dc_vendor_shop.phpThe new override
/theme/MultivendorX
/shortcode
/vendor_lists.php
taxonomy-dc_vendor_shop.phpHere’s the override custom vendor_lists.php. It complete broken. It was working perfectly before. This is really frustrating 🙁
<?php
/**
* The template for displaying vendor lists
*
* Override this template by copying it to yourtheme/dc-product-vendor/shortcode/vendor_lists.php
*
* @author WC Marketplace
* @package WCMp/Templates
* @version 2.2.0
*/if (!defined(‘ABSPATH’))
exit; // Exit if accessed directly
global $WCMp;/* ——————————– */
/* VENDOR ARCHIVE PAGE */
/* ——————————– */
?>
<div class=”vendorlist”>
<div class=”container”><div class=”row”>
<?php if ($vendors && is_array($vendors)) {
foreach ($vendors as $vendor_id) {$vendor = get_wcmp_vendor($vendor_id);
$image = $vendor->get_image() ? $vendor->get_image(‘image’, array(250, 125)) : $WCMp->plugin_url . ‘assets/images/WP-stdavatar.png’;
$banner = $vendor->get_image(‘banner’) ? $vendor->get_image(‘banner’, array(800, 400)) : ”;
$vendor_meta = get_user_meta($vendor_id);
$vendor_description = $vendor_meta[‘_vendor_description’][‘0’];
// print_r($vendor_description);?>
<?php } ?>
<?php }
else {
_e(‘No vendor found!’, ‘dc-woocommerce-multi-vendor’);
} ?></div>
<div class=”row”>
<div class=”col-12″>
<!– pagination –><?php if(!apply_filters(‘wcmp_vendor_list_ignore_pagination’, false)) : ?>
<div class=”wcmp-pagination”>
<?php echo paginate_links( apply_filters( ‘wcmp_vendor_list_pagination_args’, array(
‘base’ => $base,
‘format’ => $format,
‘add_args’ => false,
‘current’ => max( 1, $current ),
‘total’ => $total,
‘prev_text’ => ‘Prev’,
‘next_text’ => ‘Next’,
‘type’ => ‘list’,
‘end_size’ => 3,
‘mid_size’ => 3,
) ) );
?>
</div>
<?php endif; ?></div>
</div></div>
</div> -
November 10, 2022 at 8:54 PM #146067
NerdySupportExpert Moumita
Keymaster@nathan, as we have renamed WCMp to MultiVendorX, hence you need to replace the “wcmp” with “mvx” in the code too.
You also need to declare global $mvx;please check the code here https://prnt.sc/02yuRQN0Wgm2, it might give you some error.
-
November 10, 2022 at 11:41 PM #146075
nathan
ParticipantThanks for the reply. That all seems to be working correctly now. A quick FYI which may help other people and is really important for custom vendor archive and info pages.
Change all wcmp functions to mvx APART from these below!!
add_filter(‘wcmp_load_default_vendor_list’, ‘__return_true’);
add_filter(‘wcmp_load_default_vendor_store’, ‘__return_true’);These are the only two functions i didnt change to mvx and now my templates are back to normal. thanks for your help, you can close this ticket.
-
November 11, 2022 at 12:59 PM #146107
Sangita Support Squad
KeymasterThanks for the update.
We would love it if you shared your experience by giving us 5/5 review here : https://wordpress.org/support/plugin/dc-woocommerce-multi-vendor/reviews/#new-post
Seeing glowing reviews from existing customers makes others more comfortable knowing they’ll get the support they need should an issue with our services arise.
-
-
AuthorPosts
- The topic ‘Bugs from migration from WCMp to MultivendorX – Broken Vendor pages’ is closed to new replies.



