Support Forum
Hello,
I am building a product catalog website avoiding Woocommerce like wildfire.
It has no e-commerce functionality like user profiles, carts, checkouts etc., just plain products with custom fields. I'm using Oxygen Builder, if that's of any relevance.
I want to be able to add the products to a comparison table "cart" of sorts and when that cart is viewed to display the products side by side with their custom fields, and I'm thinking of Metabox favorite posts might be able to do the trick to some extent.
Why am I doing this instead of going the Woocommerce way? Simple answer - custom tables, less bloat from unrequired functionality, less plugins, etc.
Any pointers on how to achieve that?
I've seen that Toolset has something similar, and I found a plugin to compare CPTs, but it doesn't look trustworthy. Keep in mind that I have limited PHP knowledge.
Thanks
Okay, MB Favorite posts is the thing that will do the trick.
Now, the question is how do I make it display the products' fields in a repeater...Is there a way to query the favorites area in the advanced query editor and get the fields so I can build the side by side comparison instead the table view?
Thanks
Hi,
The frontend dashboard does not support customizing the table to display custom fields of listing posts. You can follow this topic to create your own dashboard with coding https://support.metabox.io/topic/duplicate-dashboard-shortcode/
If you have limited knowledge about coding, you can create a service request here https://metabox.io/contact/. Our developer will help you to create custom code as your requirements for a small extra fee.
I see. Thank you very much. I will try to do it and learn a thing or two then 🙂
Alright, I've been reading this: https://docs.metabox.io/mb-favorite-posts/#data in relation to this post here: https://support.metabox.io/topic/mb-favorite-posts-customization/
But I can't seem to make it output the posts custom fields that are assigned to it.
Should I use meta_query?
What am I missing?
Is there a snippet that I can use?
There are 5 field groups, primarily text fields and number fields. No repeaters.
This is what I'm adding to the code:
<?= esc_html(rwmb_the_value($marka)) ?>
in posts.php
Still doesn't display the custom field value.
Hi,
You can pass the variable $post_id
to the helper function in the loop to get the field value.
$marka = rwmb_meta( 'field_id', '', $post_id );
echo $marka;