- This topic has 9 replies, 2 voices, and was last updated 1 year, 3 months ago by
Sangita Support Squad.
-
AuthorPosts
-
-
May 20, 2024 at 11:55 PM #220087
l.gan
ParticipantHello
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; }output
echo get_random_taxonomies(); -
May 21, 2024 at 12:18 PM #220102
Sangita Support Squad
KeymasterHello @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 #220170
Sangita Support Squad
KeymasterHi @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));
Let us know if you need any further assistance from our end.
-
May 25, 2024 at 7:40 PM #220173
Sangita Support Squad
KeymasterOk. 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 #220529
Sangita Support Squad
Keymaster@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'
Let us know if you need any further assistance from our end.
-
June 8, 2024 at 5:21 PM #220539
l.gan
ParticipantThis reply has been marked as private. -
June 8, 2024 at 6:08 PM #220542
Sangita Support Squad
KeymasterHi 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.
-
December 20, 2024 at 10:20 AM #237942
Sangita Support Squad
KeymasterIt’s been long and we have not heard back from you. We presume your query has been resolved. We are closing this thread. If you need help or face issue in future please do create a new support ticket.
-
-
AuthorPosts
- The topic ‘Display a random list of other vendors on a vendor’s store page’ is closed to new replies.






