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 <?php getOptionTierPriceHTML: function(el, opConfig) { return ''; },

    How to solve conflict with MagicToolbox_MagicZoom extension

    MagicToolbox_MagicZoom conflicts with Advanced Product Options extension. To solve this conflict, you need to comment the line #113 out in the file app/code/local/MagicToolbox/MagicZoom/etc/config.xml:

    php <?php <product_view_options_type_select>MagicToolbox_MagicZoom_Block_Product_View_Options_Type_Select</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.
    • 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 <a title="" rel="mageworxLightbox[]" href="http://YOUR_WEBSITE/media/customoptions/options/2149/4954/d4d60afe5763d5b43a.jpg">Custom_text</a>

    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 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 <?php ; The value must be equal or higher client_max_body_size = 12M suhosin.post.max_vars = 10000 suhosin.request.max_vars = 10000

    Presumably there is an intermediate proxy server like nginx between PHP and the sent request process. It may have a limitation for data to be sent.

    php <?php ; The value must be equal or higher client_max_body_size = 12M What should you do if some settings don’t meet the requirements?

    • Locate the .htaccess file in your Magento root folder and add the following lines:

    php_value max_input_vars = 10000 php_value upload_max_filesize = 12M php_value post_max_size = 12M php_value suhosin.post.max_vars = 10000 php_value suhosin.request.max_vars = 10000 Once done and saved, execute a phpinfo command again and see if the changes have been applied.

    • If your Server API = CGI/FastCGI (see phpinfo), you should create the .user.ini file in your Magento root. The file should contain:

    max_input_vars = 10000 upload_max_filesize = 12M post_max_size = 12M suhosin.post.max_vars = 10000 suhosin.request.max_vars = 10000

    • This solution is more preferable to the previous ones. You should add the lines below in ect/php.ini:

    max_input_vars = 10000 upload_max_filesize = 12M post_max_size = 12M suhosin.post.max_vars = 10000 suhosin.request.max_vars = 10000

    The changes would require you to restart Apache.

    Partial support for Organic Internet’s Simple Configurable Products

    In order to get the extensions work together one should edit the file: /app/design/frontend/base/default/layout/simpleconfigurableproducts.xml and comment out the block:

    xml <reference name="product.info.options"> <action method="setTemplate"> <template>catalog/product/view/scpoptions.phtml</template> </action> </reference>

    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 <?php hideQty: function() { if (!$('qty')) { setTimeout('optionSetQtyProduct.hideQty()', 100); return; } //$('qty').previous('label').style.visibility = 'hidden'; //$('qty').style.visibility = 'hidden'; $('qty').writeAttribute('readonly', 'readonly'); },

    __js('for') ?>__js('each') ?>__js('and') ?>__js('save') ?>