Advertisement
Guest User

Untitled

a guest
Jul 28th, 2015
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. <?php
  2. set_time_limit(0);
  3.  
  4. require_once "blablabla/app/Mage.php";//my path here
  5. umask(0);
  6. Mage::app();
  7.  
  8.  
  9. $sku="876297-6"; //some Sku
  10. $_product = Mage::getModel('catalog/product')->loadByAttribute('sku',$sku);
  11.  
  12. $param = array(
  13. 101=>array(
  14. 'position'=>3
  15. ),
  16. 102=>array(
  17. 'position'=>5
  18. )
  19. );
  20. $_product->setRelatedLinkData($param);
  21. $_product->save();
  22.  
  23. echo "Great!!";
  24.  
  25. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement