Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. Error filtering template: Notice: unserialize(): Error at offset magento widget
  2.  
  3. <?php
  4.  
  5. use MagentoFrameworkAppBootstrap;
  6. use MagentoWidgetHelperConditions;
  7. require __DIR__ . '/app/bootstrap.php';
  8.  
  9. $bootstrap = Bootstrap::create(BP, $_SERVER);
  10.  
  11. $obj = $bootstrap->getObjectManager();
  12.  
  13. $state = $obj->get('MagentoFrameworkAppState');
  14. $state->setAreaCode('frontend');
  15. $cons= array(
  16. "1"=>array(
  17. "type"=>'MagentoCatalogWidgetModelRuleConditionCombine',
  18. "aggregator"=>'all',
  19. "value"=>'1',
  20. "new_child"=>'',
  21. ),
  22. "1--1"=>array(
  23. 'type'=>'MagentoCatalogWidgetModelRuleConditionProduct',
  24. 'attribute'=>'sku',
  25. 'operator'=>'()',
  26. 'value'=>'crowe-sweater,Easy Full Dress,Herve Leger,Striped Maxi Dress,Daisy Lace Trim Blouse',
  27. )
  28. );
  29. $a=new Conditions();
  30. $s=$a->encode($cons);
  31. echo "<pre>";
  32. echo($s);
  33. echo "</pre>";exit;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement