-
So, I have this woocommerce product view plugin that I use along with userpro.
Userpro has this shortcode “postbyuser.”
I want to use this particular plugin to show products “postbyuser” in their profile page.
I know these are two different plugins and needs to communicate with each other.
1. Woocommerce plugin: needs to filter products based on the author or profile user (postbyuser).
2. Userpro profile page: needs to display the woocommerce plugin that shows only the products of author of the profile page.
Where should I even start?
Any suggestion will be greatly appreciated.
Hi,
1. Woocommerce plugin: needs to filter products based on the author or profile user (postbyuser).
Can you please elaborate in detail please? Do you want to craete a filter on woocommerce product page ? so that it will show products of particular user ?
If yes you can do it by postbyuser shortcode given below .Correct me if I misunderstood something .2. Userpro profile page: needs to display the woocommerce plugin that shows only the products of author of the profile page.
To show the products of specific user , you can user this shortcode –
[userpro template=view]
[userpro template=postsbyuser postsbyuser_types=product]
Hi.
So, I decided to modify the “postbyuser” template.
I need to add the following:
1. Price
2. Category
3. DateHere is what I have so far:
if ($hide_price !== ‘0’) :
$output .= ‘<div class=”price”>’;
$output .= $product->get_price_html ();
$output .= ‘</div>’;$output .= ‘<div class=”category”>’;
$output .= $product->get_categories();
$output .= ‘</div>’;$output .= ‘<div class=”date”>’;
$output .= get_the_date(”,$product->id);
$output .= ‘</div>’;How would I change postbyuser so that I can implement the above in the code?
Try this shortcode –
[userpro template=publish publish_heading=”Add New Product” allowed_taxonomies=product_cat publish_button_primary=”Upload/Add Product” post_type=product post_meta=_sale_price,_regular_price,_price post_meta_labels=”Sale Price,Regular Price,Price”]
Thank you for the reply.
Sorry but I am not in need for publish shortcode.
So, I am exclusively using [postbyuser] shortcode for woocommerce product only.
In the postbyuser.php file, how can I edit it so that price and category of the product can be called and displayed along with the title of the post?
For example: picture below
Hi,
This is not possible with UserPro as of now . You can make changes in postbyuser.php file .
This needs fare amount of customization , you can ask from woocommerce support as they can tell you the code – how the to fetch price and other fields from database .
You can write your own code after this –
Thanks!
You must be logged in to reply to this topic.