bastiaanh/magento-engraving-costs

Engraving Costs Module for Magento

1.0.0 2017-05-20 18:28 UTC

This package is not auto-updated.

Last update: 2024-04-28 01:39:52 UTC


README

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.

Engraving Costs Front-end

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.

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.

Usage

  1. Login to the Magento Admin Panel and create or edit a product.
  2. Create or edit a custom option with input type Text Field or Text Area.
  3. Under price, enter the cost of one character, and select Per Character as price type.
  4. Save the product and try it out on the front-end.

Engraving Costs Admin

Installation

Install the module files using one of the following three methods:

- Install files via composer

- Install files via modman

  • Install modman

  • Use this command from your Magento installation folder:

    modman clone https://github.com/bastiaanh/magento-engraving-costs/

- Install files manually

You can copy the files from the src/ folder of this repository to the same folders of your installation

Once the files are installed:

  • 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':

    UPDATE catalog_product_option_price SET price_type = 'fixed' WHERE price_type = 'perchar';

  • Remove all extension files from your Magento installation.

  • Via composer:

    composer remove bastiaanh/magento-engraving-costs

  • Via modman:

    modman remove BastiaanH_EngravingCosts

Requirements

  • PHP >= 5.3.0

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.

Contribution

All contributions are highly appreciated. The best way to contribute code is to open a pull request on GitHub.

License

The project is licensed under the MIT license.