Engraving Costs Module for Magento
Description
Magento's custom product options can add a fixed price or a percentage to the total cost of a product. With this module you get a third one: a price Per Character. This means the option price is multiplied by the length of the text entered into the input field. This is useful for custom engravable products, where customers need to pay a surcharge per character they want engraved., (*1)
, (*2)
The product price is calculated on-the-fly by the JavaScript while the customer enters the text, and once more by the PHP code when the product is added to the cart., (*3)
Because the calculation itself hooks into Magento's core JavaScript code, multiple custom options can easily be combined. The module should be compatible with most custom front-end themes without any need for modifications., (*4)
Usage
- Login to the Magento Admin Panel and create or edit a product.
- Create or edit a custom option with input type Text Field or Text Area.
- Under price, enter the cost of one character, and select Per Character as price type.
- Save the product and try it out on the front-end.
, (*5)
Installation
Install the module files using one of the following three methods:, (*6)
- Install files via composer
- Install composer
- Install magento composer installer
-
Use this command from your Magento installation folder:, (*7)
composer require bastiaanh/magento-engraving-costs
, (*8)
- Install files via modman
- Install modman
-
Use this command from your Magento installation folder:, (*9)
modman clone https://github.com/bastiaanh/magento-engraving-costs/
, (*10)
- Install files manually
You can copy the files from the src/
folder of this repository to the same folders of your installation, (*11)
Once the files are installed:, (*12)
- Clear the cache, logout from the admin panel and then login again.
Uninstallation
-
Make sure there are no more custom options with price type 'perchar':, (*13)
UPDATE catalog_product_option_price SET price_type = 'fixed' WHERE price_type = 'perchar';
, (*14)
-
Remove all extension files from your Magento installation., (*15)
-
Via composer:, (*16)
composer remove bastiaanh/magento-engraving-costs
, (*17)
-
Via modman:, (*18)
modman remove BastiaanH_EngravingCosts
, (*19)
Requirements
Compatibility
- Magento CE >= 1.6 and < 2.0
- Magento EE >= 1.11 and < 2.0
Support
If you have any issues with this extension, feel free to open an issue on GitHub., (*20)
Contribution
All contributions are highly appreciated. The best way to contribute code is to open a pull request on GitHub., (*21)
License
The project is licensed under the MIT license., (*22)