Skip to Main Content »

Search Site

You're currently on:


Other modifications for the Simple Product Options for WooCommerce WordPress plugin


These modifications may not contain screenshots and a detailed changes.txt file but you can still find them useful.

<- <- <- Go Back to the main modifications page

Most of these modifications are from an older version of this plugin.
So do not replace entire files just edit the modified lines.

Don't forget to disable plugin update after applying a modification:
https://stackoverflow.com/questions/17897044/wordpress-how-to-disable-plugin-update

"Select Options" instead of "Add to Cart" on the category page.
It will display "Select Options" in the Add to Cart button on the category page if product has required options.
screenshot
download modified files and instructions : Select_Options_on_category_page.zip
Duplicate product with options
This modification will duplicate product options when the product is duplicated (Copy to a new draft).
screenshot
download modified files and instructions : duplicate_product_with_options.zip
download the Product Options 1.0.0 plugin with all files modified: pofw_1.0.0_with_duplicate_product_with_options.zip
Pre-select drop-down options
This modification will pre-select all the drop-down options on page loading with JavaScript.
All the drop-down options will have the first value selected by default.
screenshot
download modified files and instructions : preselect_first_dropdown_value_by_default.zip
Also you can install the "POFW Option Default" plugin to preselect product options:
https://wordpress.org/plugins/pofw-option-default/
Display selected options on the orders list page
It will display selected options for listed orders on the WooCommerce Orders page in WordPress dashboard.
screenshot
download modified files and instructions : selected_options_on_orders_list_page.zip
Absolute price
This modification will replace product price with option price instead of adding extra to the product price.
You will need to add special parameter "| abs_price" at the end of the option value title.
Example:
option value title | abs_price
screenshot 1
screenshot 2
download modified files and instructions : absolute_price.zip
download the Product Options 1.0.0 plugin with all files modified: pofw_1.0.0_with_absolute_price.zip
Option quantity
This modification will display quantity text field just after the option.
The quantity value will affect the option price.
You will need to add special parameter "| qty_op" to the option title.
Example:
Cable | qty_op
The text field option should be placed with sort order after the option with quantity.
screenshot 1
screenshot 2
download modified files and instructions : option_quantity.zip
download the Product Options 1.0.0 plugin with all files modified: pofw_1.0.0_with_option_quantity.zip
Reduce stock of the linked product
This modification will reduce stock of another linked product.
The out of stock option values are not displayed on the front-end product page.
You can link product with special parameter with product SKU "| pr_sku" in the option value title:
Example:
10 meters | pr_sku 5666ggh
screenshot 1
screenshot 2
screenshot 3
download modified files and instructions : reduce_stock_of_linked_product.zip
download the Product Options 1.0.0 plugin with all files modified: pofw_1.0.0_with_reduce_stock_of_linked_product.zip
Product options in WooCommerce CSV product export
This small plugin will export product options with the WooCommerce product export feature.
The exported .csv file will have a "Product Options" column.
The options will be exported as a JSON string.
Example:
[{"title":"Choose date","price":10.00,"type":"radio","required":1,"sort_order":2,"values":[{"title":"10:00-10:30","price":10.00,"sort_order":1}]}]

This plugin is convenient if you need to copy product options to another website or to save a backup version of the options to your computer.
If you need to update option's prices or to add new option values it is easier to do with the "CSV export-import" modification: /po_modifications
screenshot export 1
screenshot export 2
screenshot export 3
screenshot export 4
screenshot import 1
screenshot import 2
screenshot import 3
screenshot import 4
Instructions of how to export-import options: README.html
download sample .csv file : wc-product-export.csv
Download the POFW CSV Export-Import plugin:
https://wordpress.org/plugins/pofw-csv-export-import/
Product options on the Shop page
To make product options work for multiple or one Add to Cart button <form> on the WooCommerce Shop page.
NOTE: This modification does not display the "add to cart" <form> tag. It just adds options into the <form> tag.
You should use some other code or plugin that displays the "add to cart" <form>
For example the WooCommerce Gift Cards plugin:
https://wordpress.org/plugins/woo-giftcards/
displays the add to cart <form> for each Add to Cart button of the products listed on the Shop page
Also this code:
https://gist.github.com/helgatheviking/5e3bdca9f6dc9d33a7248b2aacb1d6c3
displays a single add to cart <form> with a shortcode like this:
[add_to_cart_form id="273"]
screenshot 1
screenshot 2
download modified files and instructions : product_options_on_shop_page.zip
download the Product Options 1.0.0 plugin with all files modified: pofw_1.0.0_with_product_options_on_shop_page.zip
Percent price
With this modification you can specify percent price instead of fixed price for the option value.
The percent price will be calculated from the current total price (product price + price of the previously selected options).
To specify percent value you will have to add special parameter "| percentoftotal" into the option value title field. Example:
10:00-10:30 | percentoftotal 20
Optionally you can add "| exludepercent" parameter into the title field of the option that you want to exclude from percent calculation.
screenshot 1
screenshot 2
download modified files and instructions : percent_of_total.zip
download the Product Options 1.0.0 plugin with all files modified: pofw_1.0.0_with_percent_of_total.zip
Discount Rules for WooCommerce
To make it compatible with the Discount Rules for WooCommerce plugin.
It will add option price value after the discount is applied.
It is possible to modify the code further to make it apply the discount to the product option prices also.
screenshot
download modified files and instructions : with_woo_discount_rules.zip
download the Product Options 1.0.0 plugin with all files modified: pofw_1.0.0_with_woo_discount_rules.zip
Custom CSS class for option
This modification will add custom CSS class into the option's HTML tag on the front-end product page.
You can specify CSS class in the option title with special parameter "| css_class"
Option title example:
Number of days | css_class my_class
screenshot 1
screenshot 2
download modified files and instructions : custom_css_class_for_option.zip
download the Product Options 1.0.0 plugin with all files modified: pofw_1.0.0_with_custom_css_class_for_option.zip
Also you can install this modification as a separate plugin:
https://wordpress.org/plugins/pofw-option-css/
Get selected option value on the shopping cart page
If you need to get selected option value on the shopping cart page in your custom code.
So that your custom code can perform extra actions depending on the option value selected.
screenshot 1
screenshot 2
download modified files and instructions : custom_css_class_for_option.zip
WooCommerce Deposits
To make it add option price correctly on the shopping cart when user selected to pay in deposit instead of full payment.
WooCommerce Deposits plugin:
https://docs.woocommerce.com/document/woocommerce-deposits/
screenshot 1
screenshot 2
download modified files and instructions : woocommerce_deposits.zip
Limit number of selectable checkboxes
Don't allow customer to select more checkbox values than the specified limit.
screenshot 1
screenshot 2
download modified files and instructions : limit_number_of_selectable_checkbox_values.zip
Also this plugin:
https://wordpress.org/plugins/pofw-pizza-toppings/
can limit the number of the selectable checkbox options.