Modifications for the Product Category Dropdowns WordPress plugin:
Don't forget to disable plugin update after applying a modification:
https://stackoverflow.com/questions/17897044/wordpress-how-to-disable-plugin-update
- Horizontal view
-
This modification will display all drop-down selects in one line and will display one select per line on mobile (responsive) view.
screenshot 1
screenshot 2
download modified files and instructions : horizontal_view.zip
download the Product Category Dropdowns 1.0.0 plugin with all files modified: pcd_1.0.0_with_horizontal_view.zip
- Start from selected category
-
This modification will display child categories of some selected category instead of the root categories in the first drop-down select.
You will have to specify the category ID in the .php file like this:
protected $_startFromCategoryId = 16;
screenshot
download modified files and instructions : start_from_category_id.zip
- Only root categories
-
It will display only the first drop-down with the root categories.
After selecting the first drop-down it will redirect to the category page.
download modified files and instructions: only_root_categories.zip - Exclude some root categories
-
It will not display some categories in the first dropdown select.
You will have to specify category ids in the .php file like this:
$excludeCategoryIds = array(15, 56, 12);
download modified files and instructions: exclude_some_root_categories.zip - Limit number of levels
-
This modification will submit after selecting the second dropdown select.
You can specify the number of levels in the .js file like this:
levelLimit : 2,
download modified files and instructions: limit_number_of_levels.zip - Only categories with in stock products
-
It will display only the categories that have products available for purchase (In Stock).
download modified files and instructions: only_categories_with_in_stock_products.zip - Display empty categories
-
It will display categories with no products in the dropdown selects.
Instructions: display_empty_categories.txt
- Category sort order
-
It will display categories in Category order instead of ordering alphabetically by name.
screenshot
download modified files and instructions: sort_order_category_order.zip - Custom dropdown titles
-
With this modification you can specify custom titles for the first, second and the third drop-down selects.
Also it is possible to display different titles depending on the first selected category.
You will have to specify the category titles in the .js file like this:
var selectTitles = ["-- select category --", "-- select sub category --", "-- select sub sub category --"];
screenshot
download modified files and instructions : custom_dropdown_titles_for_category_id.zip
- Disable auto search
-
To make it not search automatically when the last category is selected.
User will have to click the Search button to see the results.
Replace the line:
this.submitCategory(cId);
with:
// this.submitCategory(cId);
in the file:
wp-content/plugins/product-category-dropdowns/view/frontend/web/main.js
- Display default selects on page load
-
It will make three drop-down selects always visible.
screenshot
download modified files and instructions : display_default_dropdowns_on_page_load.zip
NOTE: If you need it for make and model selection check this plugin:
https://wordpress.org/plugins/ymm-search/ - Display image for selected category
-
It will display an image below the drop-down selects for the selected category.
You will have to specify image file names for category ids in the .js file like this:
images[91] = '3157.jpeg';
images[89] = 'Car.gif';
and then to upload the images in some folder on your website.
screenshot
download modified files and instructions : display_image_for_selected_category.zip
- Display product tags in the last dropdown
-
It will display product tags in the last drop-down select after selecting all categories.
screenshot 1
screenshot 2
download modified files and instructions: display_product_tags_in_last_dropdown.zip
download the Product Category Dropdowns 1.0.0 plugin with all files modified: pcd_1.0.0_with_product_tags_in_last_dropdown.zip
- Display products in the last dropdown
-
It will display an extra drop-down select with products for the last selected category.
screenshot
You can buy this modification on the page: /pcd-products-in-last-dropdown.html - Products of the same category
-
It will display a drop-down select on the product page with other products of the same category.
So that the user can switch the product.
This drop-down select can be added to the product page with a shortcode.
screenshot 1
screenshot 2
download modified files and instructions: products_of_the_same_category.zip