cancel
Showing results for 
Search instead for 
Did you mean: 

configurablebundleaddon add entire bundle in Cart with one click

0 Kudos

I am working on POC on configurableBundleAddOn, I want to add the entire bundle to be added to cart with one button Click, I checked the selection strategies like PickExactlyNBundleSelectionCriteria , PickNToMBundleSelectionCriteria works fine however the strategy I am interested in is AutoPickBundleSelectionCriteria its is not working as expected, please let me know if PickNToMBundleSelectionCriteria can work OOTB or I have to write custom logic to add the child bundle template to achieve this functionality :

###Staged

$productCatalog=electronicsProductCatalog

$productCatalogName=Electronics Product Catalog

$catalogVersion=catalogversion(catalog(id[default=$productCatalog]),version[default='Staged'])[unique=true,default=$productCatalog:Staged]

$approved=approvalstatus(code)[default='approved']

$ruleType=ruleType(code)[default='ANY']

UPDATE BundleTemplate;id[unique=true];products(code, $catalogVersion);version[default=1.0][unique=true];$catalogVersion

;StarterLensComponent;816802

INSERT_UPDATE AutoPickBundleSelectionCriteria;id[unique=true];$catalogVersion

;StarterLensSelection_AutoPickBundleSelection

UPDATE BundleTemplate;id[unique=true];version[default=1.0];bundleSelectionCriteria(id, $catalogVersion);$catalogVersion

;StarterLensComponent;;StarterLensSelection_AutoPickBundleSelection

###Online

$productCatalog=electronicsProductCatalog

$productCatalogName=Electronics Product Catalog

$catalogVersion=catalogversion(catalog(id[default=$productCatalog]),version[default='Online'])[unique=true,default=$productCatalog:Online]

$approved=approvalstatus(code)[default='approved']

$ruleType=ruleType(code)[default='ANY']

UPDATE BundleTemplate;id[unique=true];products(code, $catalogVersion);version[default=1.0][unique=true];$catalogVersion

;StarterLensComponent;816802

INSERT_UPDATE AutoPickBundleSelectionCriteria;id[unique=true];$catalogVersion

;StarterLensSelection_AutoPickBundleSelection

UPDATE BundleTemplate;id[unique=true];version[default=1.0];bundleSelectionCriteria(id, $catalogVersion);$catalogVersion

;StarterLensComponent;;StarterLensSelection_AutoPickBundleSelection

# I tried to add AutoPickBundleSelectionCriteria however it didnot worked

Accepted Solutions (0)

Answers (0)