Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Ultimate › where can I get these data from
- This topic has 7 replies, 3 voices, and was last updated 5 years, 8 months ago by WCFM Forum.
- AuthorPosts
- March 26, 2019 at 6:36 am #54516MarsMarsParticipant
Hello,
I want to create the following APIs, but not sure where can I get the data from.. or if you guide me to the functions that generate them
1. Get Single Store Info
2. Get Single Store Products
3. Get Single Store Reviews
4. Get All Stores listRegards
- March 26, 2019 at 1:28 pm #54552MarsMarsParticipant
Hi
I managed to get 1,3,4 and I think 2 will be done easily
the issue is how can get the total average rating for a single store
also How can I get the detailed ratings in a single store review - March 26, 2019 at 3:37 pm #54584MarsMarsParticipant
also, I tried to get products list by the vendor
so when I was debugging,, I was wondering if this is correct it always return an error?
in this file: class-wcfmapi-rest-controller.php/** * Get object. * * @param int $id Object ID. * @return object WC_Data object or WP_Error object. */ protected function get_object( $id ) { return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass.", 'wcfm-marketplace-rest-api' ), __METHOD__ ), array( 'status' => 405 ) ); }
- March 26, 2019 at 4:33 pm #54608WCFM ForumMember
Hi,
Please use this to get vendor’s products –
global $WCFM; $vendor_product_list = $WCFM->wcfm_vendor_support->wcfm_get_products_by_vendor( $vendor_id, 'publish', array( 'suppress_filters' => true ) );
Thank You
- March 26, 2019 at 4:51 pm #54621MarsmarsGuest
Thanks will try it
How can I get the detailed ratings in a single store review - March 28, 2019 at 9:53 am #54909WCFM ForumMember
Hi,
Single store review all details are already displayed – https://ibb.co/28qyRsy
What else you want to show?
Just to mention, “review reply” option will be there very soon.
Thank you
- March 28, 2019 at 9:59 am #54917MarsMarsParticipant
yes I know
I want to create api thats why I am asking how can I get the data - March 28, 2019 at 2:03 pm #54999WCFM ForumMember
OK, understand.
Please check this template – wp-content\plugins\wc-multivendor-marketplace\views\reviews\wcfmmp-view-reviews-latest-review.php
Thank You
- AuthorPosts
- The topic ‘where can I get these data from’ is closed to new replies.