Reading list Switch to dark mode

    PrestaShop Combination Activate / Deactivate {User Guide}

    Updated 7 February 2024

    PrestaShop Combination Activate / Deactivate: PrestaShop has given its users a very convenient and handy functionality to add Combinations to its products. In PrestaShop, Combinations generate in two simple ways: Manual and Automatic.

    But to add little additional functionality to this we have built this PrestaShop Combination Activate/Deactivate module. The extension lets admin change the status of the existing combinations. Activate or deactivate the combinations of individual products or update the status of product combinations in bulk by uploading a CSV file.

    Note: PrestaShop Combination Activate / Deactivate module is compatible with PrestaShop framework version 8.x.x.

    Features of Prestashop Combination Activate / Deactivate

    • Disable the combinations of a product you do not want to show on the storefront.
    • Enable the combinations whenever required.
    • Choose to show the deactivated combinations as out of stock on the front.
    • Activate or deactivate the combinations in bulk by uploading a CSV file.
    • Deactivate product combination when quantity becomes 0.
    • View a list of deactivated combinations under a separate tab in the back office.
    • PrestaShop Combination Activate / Deactivate module is MultiShop Compatible.

    NOTE

    How to Install Prestashop Combination Activate / Deactivate

    • Firstly, go to the module manager in the back office and click on ‘upload a module’.
    • After that, drag and drop the module file or select the file from the system.
    • In this way, the module installation will be successful.
    image-108
    image-109
    image-137

    Custom Hooks Information

    1. For Module version 4.2.0 and above versions compatible with PrestaShop version V1.7.3.1 and above

    In file: /src/PrestaShopBundle/Resources/views/Admin/Product/ProductPage/Forms/form_combination.html.twig

    Searching for an experienced
    Prestashop Company ?
    Find out More

    Add this hook

    <meta http-equiv="content-type" content="text/html; charset=utf-8"><code>{{ renderhook('displayWkCombinationStatus', { 'id_product_attribute':form.vars.value.id_product_attribute }) }}</code>

    after quantity section close ‘{% endif %}’ and before ‘<td class=”attribute-actions”>’
    in PrestaShop core file – form_combination.html.twig

    2.  For Module version 4.1.1 and below versions compatible with PrestaShop version V1.7.3.0 and below

    (A.) Add hook in return array and after form->createview()

    In file: /src/PrestaShopBundle/Controller/Admin/CombinationController.php

    <meta http-equiv="content-type" content="text/html; charset=utf-8"><code>'displayWkCombinationStatus' => \Hook::exec('displayWkCombinationStatus', array( 'id_product_attribute' => $combinationId, 'edit_product_link' => $this->generateUrl('admin_product_form', array('id' => (new \Product((new \Combination($combinationId))->id_product))->id)) ) ),</code>

    in generateCombinationFormAction() of CombinationController.php

    (B.) In File: /src/PrestaShopBundle/Resources/views/Admin/Product/Include/form_combination.html.twig

    Add this hook

    <meta http-equiv="content-type" content="text/html; charset=utf-8"><code>{{ displayWkCombinationStatus|raw }}</code>

    after attribute-quantity section and before attribute-actions class in form_combination.html.twig file

    Workflow of the Module

    After the successful installation of the module, a new column for status gets available to the product combination list. By default, the status of the existing combinations will be “Active”.

    Go to Catalog -> Edit Product -> Combinations to view the existing combinations of a particular product.

    1-6

    Also, the admin can activate or deactivate the status of the existing combinations.

    2-5

    Front End View

    The users can view only the active combinations on the product page.

    3-4

    NOTE: It is mandatory for at least one combination to be active at any particular time.

    If the admin tries to deactivate all the combinations of the product, an error message will display on the page.

    4-5

    Module Configuration

    image-110

    Display deactivated combination as out of stock

    If enabled, then the deactivated combinations of a product as out of stock on the product page.

    6-5

    In the above screenshot we can see that the deactivated combination (Size: XL, Color: White) is displayed as out of stock.

    If admin has disabled the option, then the combination will be hidden from the product page.

    If the quantity of a combination Size: S, Color: Black goes to 0, then the combination will be disabled automatically.

    7-4

    The module automatically deactivates the combination once it gets out of stock. So, when the admin refreshes the page, the status of the combination will change.

    9-4

    Front End View

    As per the configuration, the combination will not display on the product page.

    10-5

    Deactivated Combinations List

    After the installation of the module, a new tab “Deactivated Combinations” get available under Catalog. From here, the admin can view a list of all the combinations he has deactivated.

    12-4

    Bulk Upload

    Now, the admin can activate or deactivate the product combinations in bulk with bulk upload feature.

    image-108

    In a CSV file, the admin needs to create 3 columns: product ID, product attribute ID, and Enable. Product ID and product attribute ID are for the identification of the combination for which the admin needs to updated the status. And, in the enable column, the admin needs to specify 0 or 1. 0 means deactivate and 1 means activate.

    Screenshot-from-2024-02-07-16-35-18-1200x675-png-1200×675-

    After uploading the CSV file, the admin can view a list of combinations deactivated under the deactivated combinations tab.

    16-2

    Support

    For any kind of technical assistance or query, please raise a ticket or send us a mail at [email protected]

    Also, please explore our Prestashop development services and a vast range of quality Prestashop addons.

    Current Product Version - 5.1.2

    Supported Framework Version - 8.x.x, 1.7.x.x

    . . .

    Leave a Comment

    Your email address will not be published. Required fields are marked*


    Be the first to comment.

    Back to Top

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home

    Table of Content