PrestaShop Combination Activate / Deactivate module 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 version 8.x.x and catalog product new page version V2.
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
- This module is also compatible with the PrestaShop Advanced Multi-Vendor Marketplace module.
- Also, The module is multi-shop compatible with PrestaShop Advanced Multi-Vendor Marketplace version 5.4.0/3.4.0 and above.
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.
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
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.
Also, the admin can activate or deactivate the status of the existing combinations.
Front End View
The users can view only the active combinations on the product page.
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.
Module Configuration
Display deactivated combination as out of stock
If enabled, then the deactivated combinations of a product as out of stock on the product page.
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.
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.
Front End View
As per the configuration, the combination will not display on the product page.
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.
Bulk Upload
Now, the admin can activate or deactivate the product combinations in bulk with bulk upload feature.
In a CSV file, the admin needs to create 3 columns: product ID, product attribute, and Enable.
Product ID and product attribute 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.
After uploading the CSV file, the admin can view a list of combinations deactivated under the deactivated combinations tab.
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.3
Supported Framework Version - 8.x.x, 1.7.x.x
Be the first to comment.