Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Error filtering template: Notice: unserialize(): Error at offset magento widget
- <?php
- use MagentoFrameworkAppBootstrap;
- use MagentoWidgetHelperConditions;
- require __DIR__ . '/app/bootstrap.php';
- $bootstrap = Bootstrap::create(BP, $_SERVER);
- $obj = $bootstrap->getObjectManager();
- $state = $obj->get('MagentoFrameworkAppState');
- $state->setAreaCode('frontend');
- $cons= array(
- "1"=>array(
- "type"=>'MagentoCatalogWidgetModelRuleConditionCombine',
- "aggregator"=>'all',
- "value"=>'1',
- "new_child"=>'',
- ),
- "1--1"=>array(
- 'type'=>'MagentoCatalogWidgetModelRuleConditionProduct',
- 'attribute'=>'sku',
- 'operator'=>'()',
- 'value'=>'crowe-sweater,Easy Full Dress,Herve Leger,Striped Maxi Dress,Daisy Lace Trim Blouse',
- )
- );
- $a=new Conditions();
- $s=$a->encode($cons);
- echo "<pre>";
- echo($s);
- echo "</pre>";exit;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement