MultivendorX
-
AuthorPosts
-
-
May 20, 2024 at 11:55 PM #220087l.ganParticipant
Hello
Thanks for the great support.
I’m trying to display a random list of other vendors on a vendor’s store page, like a “Check out more of these vendors” suggestion. I succeeded, but I can’t figure out how to get images of the vendor’s logo (their avatar, which is loaded into the dashboard) and the average rating?
Please help me, my code is:
function get_random_taxonomies() { $current_taxonomy = get_queried_object(); $taxonomies = get_terms(array( 'taxonomy' => 'dc_vendor_shop', 'number' => 10, 'orderby' => 'rand', )); $output = '<ul>'; foreach ($taxonomies as $taxonomy) { if ($taxonomy->term_id !== $current_taxonomy->term_id) { $output .= '<li><a href="' . get_term_link($taxonomy) . '">' . $taxonomy->name . '</a></li>'; } } $output .= '</ul>'; return $output; }
Copyoutput
echo get_random_taxonomies();
Copy -
May 21, 2024 at 12:18 PM #220102Sangita Support SquadKeymaster
Hello @l.gan, I have forwarded this to our development team. They will review this, and I will update you as soon as I receive their feedback.
Please note that this might take some time, as the team is currently occupied with preassigned tasks.
Thank you for your understanding.
-
May 25, 2024 at 11:55 AM #220170Sangita Support SquadKeymaster
Hi @l.gan, Kindly incorporate the below code on your end to get the vendor logo and rating.
$vendor = get_mvx_vendor($taxonomy->term_id); $image = $vendor->get_image() ? $vendor->get_image('image', array(125, 125)) : $MVX->plugin_url . 'assets/images/WP-stdavatar.png' $rating_info = mvx_get_vendor_review_info($taxonomy->term_id); $MVX->template->get_template('review/rating_vendor_lists.php', array('rating_val_array' => $rating_info));
CopyLet us know if you need any further assistance from our end.
-
May 25, 2024 at 7:40 PM #220173Sangita Support SquadKeymaster
Ok. Let me share this with the dev team. They will look into it.
Once I hear back from them I will get back to you accordingly. -
June 8, 2024 at 12:08 PM #220529Sangita Support SquadKeymaster
@l.gan, To get the vendor image you can simply follow the below given code snippet –
$vendor = get_mvx_vendor($taxonomy->term_id); $image = $vendor->get_image() ? $vendor->get_image('image', array(125, 125)) : $MVX->plugin_url . 'assets/images/WP-stdavatar.png'
CopyLet us know if you need any further assistance from our end.
-
June 8, 2024 at 5:21 PM #220539l.ganParticipantThis reply has been marked as private.
-
June 8, 2024 at 6:08 PM #220542Sangita Support SquadKeymaster
Hi there,
Thanks for sharing the details with us. Since you are implementing a custom flow with custom code, it’s challenging for us to review and assist with your modifications.
However, I will share this with the dev team and keep you posted once I hear back from them.
-
-
AuthorPosts
Please LOGIN to reply to this topic