Skip to content

Advanced Product Options FAQ

Active options are only visible in the backend, not the frontend

In order to resolve the APO issue, admin should:

  • Resave an affected product (make sure Design ->Display Product Options = NOT EMPTY)

  • Edit the latest APO installer (example:mysql4-upgrade-3.9.99-4.0.0.php) and add the code:

```php getAttribute('catalog_product', 'options_container'); if (!empty($attribute['attribute_id'])) { $this->run("INSERT INTO `{$this->getTable('catalog_product_entity_varchar')}` (`entity_type_id`, `attribute_id`, `entity_id`, `value`) SELECT '{$attribute['entity_type_id']}' AS entity_type_id, '{$attribute['attribute_id']}' AS attribute_id, `entity_id`, 'container1' AS value FROM `{$this->getTable('catalog_product_entity')}` WHERE entity_id IN (SELECT entity_id FROM {$this->getTable('catalog_product_entity')}) ON DUPLICATE KEY UPDATE `value` = 'container1';"); } ``` - Reinstall the extension’s DB tables by removing customoptions_setup record from core_resource table. ## Conflict with “Fixed Quantities” extension by Zetaprints If you use 'Fixed Quantities' extension by Zetaprints, it will conflict with Advanced Product Options. To fix this conflict you should do the following: - Create the folder *app/code/community/ZetaPrints/Fixedprices/Model/Fixedprices/* - Create the file 'Abstract.php' inside it. - Add the code in this file: ```php getModuleConfig('MageWorx_CustomOptions')->active == 'true'){ class ZetaPrints_Fixedprices_Model_Fixedprices_Abstract extends MageWorx_CustomOptions_Model_Catalog_Product_Type_Price {} } else { class ZetaPrints_Fixedprices_Model_Fixedprices_Abstract extends Mage_Catalog_Model_Product_Type_Price {} } ``` - Modify the file *app/code/community/ZetaPrints/Fixedprices/Model/Fixedprices.php* and change the inheritance to: ```php addTemplateTitleToResult(); ``` and replace it with the line: ```php addTemplateTitleToResult(); ``` This is how you can get the name on the frontend: ```php getGroupTitle(); ``` ## How to remove all custom options for all products Sometimes you need to remove all custom options from all products at once. You can do this by executing the following SQL query in your database: ```sql DELETE FROM catalog_product_option; ``` ## How to remove “+” sign from custom options on the frontend Many of you often ask us if it is possible to remove the ‘plus’ from an option’s name to make it look like: **option_name $1.00** This is how you can do this. Modify the file *www/app/code/local/MageWorx/CustomOptions/Helper/Data.php* and replace the current function with the following: ```php '; for (var tierQty in opConfig['tier_prices']) { if (!opConfig['tier_prices'].hasOwnProperty(tierQty)) continue; tierPrice = opConfig['tier_prices'][tierQty]; tierSaved = parseInt(100 - ((parseFloat(tierPrice) * 100) / opPrice)); tierHTML += '

  • __js('Buy') ?>

    '+tierQty+' '+tierPrice+' '+tierSaved+'%

  • '; } tierHTML += ''; return tierHTML; }, ```

    The code above shoud be replaced with this:

    ```php

    MagicToolbox_MagicZoom_Block_Product_View_Options_Type_Select ``` ## How to update the APO extension from versions older than 4.16.2 to the latest ones The module code pool is changed from “local” to “community”. Some module file paths are changed according to the “Magento Extension Developer’s Guide”. To install the module the right way, follow the instruction bellow. - Backup and remove folder *app/code/local/MageWorx/CustomOptions/* - Follow the [installations instructions](/genext/install/). - If you have any customizations in Extension’s core move them manually from *app/code/local/MageWorx/CustomOptions/* to *app/code/community/MageWorx/CustomOptions/* - Should you have any theme file customizations, check the list of the changed files below and move your custom code from the **OLD** to the **NEW** file location (**OLD –> NEW**): ``` - app/design/frontend/[YOUR_PACKAGE]/[YOUR_THEME]/template/customoptions/ -> app/design/frontend/[YOUR_PACKAGE]/[YOUR_THEME]/template/mageworx/customoptions/ - app/design/frontend/[YOUR_PACKAGE]/[YOUR_THEME]/layout/customoptions.xml -> app/design/frontend/[YOUR_PACKAGE]/[YOUR_THEME]/layout/mageworx_customoptions.xml - app/design/adminhtml/default/default/template/customoptions/ -> app/design/adminhtml/default/default/template/mageworx/customoptions/ - app/design/adminhtml/default/default/layout/customoptions.xml -> app/design/adminhtml/default/default/layout/mageworx_customoptions.x ``` ## Include images in option’s description This is what you need to insert into the description field to enable customers to see a linked image: ```html Custom_text ``` ## Max input vars is reached The problem might appear if not all options were sent to PHP in POST. This has nothing to do with the extension, you should just tweak your server’s settings a bit. Please check your PHP settings using a [phpinfo](http://php.net/manual/en/function.phpinfo.php) command: ``` ; The value must be equal or higher max_input_vars = 10000 upload_max_filesize = 12M post_max_size = 12M ``` If a Suhosin PHP extension is installed, you should also check these: ```php ``` ## Recurring Profiles and SKU policy If a user wants to use Recurring Profile products, and Enable Custom Options Inventory = YES, then the only possible SKU Policy config will be: ``` Enable Option SKU Policy = YES Default Option SKU Policy = Replacement Apply Option SKU Policy To = Cart and Order ``` If you don’t have those options setup, then when trying to add a Recurring Profile product that contains Custom Option Inventory options, the store will throw this error ``` Nominal item can be purchased standalone only. To proceed please remove other items from the quote. ``` Using the above settings lets you add the item to the cart, and removes the inventory of the custom options items upon checkout as desired. ##x-Qty feature: disabling read-only mode of the Qty input When using the x-Qty feature, this automatically makes the Qty input field (the one beside the ‘Add to Cart’ button) read-only. In order to enable editing of the input field, you should locate the file: *app/design/frontend/{YOUR_THEME}/{YOUR_TEMPLATE}/template/customoptions/catalog-product-view-options.phtml* and comment out ```php __js('for') ?>__js('each') ?>__js('and') ?>__js('save') ?>