Skip Navigation

[Resolved] How to make a parts shop

This support ticket is created 5 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 2.71 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 9 replies, has 2 voices.

Last updated by Luo Yang 5 years, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#1173075

Tell us what you are trying to do?
Hi,

Im trying to build a new website for a client. They sell truck parts. Having spent weeks trying to find something, I came across Toolset and bought it, looks like what I need. Im new to eccomerce, first site I have done, and need help and advice.

OK, so the site sell parts for trucks.
Various Manufacturers, lots of parts.

I have created the categories of the parts with subcategories.
e.g. Lighting > Bulbs

What I now need to do is the Manufactuter and Model of Truck which is the bit im struggling with, and the reason I just bought your plugin.

Mercedes > Acrtros
DAF > CF65

This is the important part, 1 product (light bulb for example) can fit about 10 trucks. So i need to be able to choose this on the product creation page.

I then also need some kind of Ajax filter on the sidebar. A user should be able to choose Brand = Mercedes, then only Mercedes model numbers show, and they should also be able to choose what part they want from a categories menu.

Is there any documentation that you are following?
Ive tried, but still struggling.

Is there a similar example that we can see?

What is the link to your site?
hidden link

#1173267
post-relationship-filters.JPG

Hello,

I assume you are using Woocommerce plugin to setup the custom post type "Product".

In your case, one product(parts) post can connect to multiple trucks, and one truck can connect to multiple product posts.

I suggest you try these:
1) Create two post types:
- Brand
- Model
https://toolset.com/documentation/user-guides/create-a-custom-post-type/

2) Setup one-to-many relationship between post type "Brand" and "Model"
https://toolset.com/documentation/post-relationships/
So you can setup "Brand" and "Model" posts like this:
Brand A
-- Model 1
-- Model 2
Brand B
-- Model 3

3) Setup many-to-many relationship between post type "Model" and "Product"
https://toolset.com/documentation/post-relationships/how-to-set-up-post-relationships-using-toolset/
When you edit a single product post, you will be able to connect it with multiple "Model" posts

4) Create a post view, for example "my-view", with option "Full custom display mode":
- query product posts,
- in section "Custom Search Settings", enable option "AJAX results update when visitors change any filter values"
- in section "Search and Pagination", setup the post type relationship filter by with "Model" and "Product", see screenshot:
post-relationship-filters.JPG
- in section "Loop Editor" display the product posts information

5) Create a wordpress page, display above view's search result only, for example:
[wpv-view name="my-view" view_display="layout"]

6) In the sidebar, display an "WP Views Filter" widget of view "my-view"

Then it should be able to achieve what you want:
Ajax filter on the sidebar. A user should be able to choose Brand = Mercedes, then only Mercedes model numbers show

More help:
https://toolset.com/documentation/user-guides/front-page-filters/
Building Custom Searches for Any Content Type

#1173355

Thanks for the reply 🙂

Sorry can you explain step 1 more?

I suggest you try these:
1) Create two post types:
- Brand
- Model

So when im creating the custom post type. What other options should I be selecting, should I assign any categories or tags?

Also, would I be just creating 2 separate post types, or 1 "parent" post type called Trucks, and then when I hover over that on the dashboard, I have them "add new manufacturer" and "add new model" as sub menus.

Or literally just "Manufacturers" and "Models" as their own entity on the dashboard menu?

Sorry, Im trying to follow the documentation, but Im dyslexic so the words don't go in my head, I find it easier being told exactly what to do, or following videos.

#1174015

You don't need to assign any categories or tags.

Here is a test site:
hidden link
username/password: xgren/111111

1) Create two post types:
- Brand
- Model
hidden link

2) Setup one-to-many relationship between post type "Brand" and "Model"
hidden link

3) Setup many-to-many relationship between post type "Model" and "Product"
hidden link

4) Create a post view, for example "my-view", with option "Full custom display mode"
...
hidden link

5) Put above view into a page:
hidden link

Test above page in front-end:
hidden link

It is only a demo for your reference, I still recommend you read our documents for more help.

#1174127

Hi, thanks for the information.

I have the Post types setup with the relationship. Seems to look correct.

I'm struggling with the "view" portion.

I use Beaver Builder as a page builder, im being told by another support person at Toolset to disable Beaver Builder or Toolset Layouts.

The only think I want to achieve, Is a WooCommerce Product Page and Archive page with a Filter on the left hand side or on the top. How hard can that be?

When creating a "view", I have the option Table, or Grid. Bootstrap is disabled as it just messes up my HTML markup.

I am using Generate Press theme, which i read was "100% compatible" with Toolset, its the reason I bought it.

I wouldn't say im a complete noob at HTML and CSS, but I also wouldnt say Toolset is exactly easy to use either!

#1174332

Hi

What support do I get for loggin into my set to finish this setup?

Ive looked your demo site, and cant seem to replicate it.

I'm upto the "Views" step - but just getting an error. Any chance you can login to my site and just have a look what Im doing wrong.

The filter also doeskin seem to display work right / look right.

#1175053

What is the error you get in the "Views" step? can you take a screenshot for it?
If it is a PHP error, please check these:
1) In case it is a compatibility problem, please deactivate other plugins, and switch to wordpress default theme 2019, and test again

2) If the problem still persists, please provide database dump file(ZIP file) of your website, also point out the problem page URL and view URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

For your new question:
Is a WooCommerce Product Page and Archive page with a Filter on the left hand side or on the top. How hard can that be?
In the WooCommerce Product Archive Page, you can follow our document to setup the custom search form, and display the search form in the top of search result. see our document:
https://toolset.com/documentation/user-guides/creating-wordpress-custom-post-archives/

And the document I mentioned above:
https://toolset.com/documentation/user-guides/front-page-filters/

#1175391
SLug.PNG

Hi,

Think im getting there.

But ive just noticed, as im creating all the models for a particular Manufacturer.

I there anyway, to display the Manufacturer name before the model in the slug?

Please see attached for what it currently is.

Can this be changed to daf/65cf/

and the same for all other manufacturers?

So mercedes>actros. etc..

#1175500
Also Fits.PNG

In addition to this.

When on the singular product page,

Is there a way to output the name of the "models" that a certain part fits?

I have a table, with certain custom fields, and I want to be able to list the Model name the part fits.

Like this page for an example.

#1175773

For your new questions:
1) I there anyway, to display the Manufacturer name before the model in the slug?
No, there isn't such kind of built-in feature within Types plugin, since they are two different post types, the WordPress default rewrite rules are something like these:
hidden link
hidden link
...

2) Is there a way to output the name of the "models" that a certain part fits?
Yes, it is possible, since there is many-to-many relationship between "models" and "part" posts, so in a single "part" post, you can create a post view, get related "models" posts information, see our document:
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-many-related-items
Displaying many related items

If you still need assistance for it, new ticket please, thanks