IPHONE 模板块、Magento 使用Api将Sku添加到Url中 /Magento Free template iphone
来源:互联网 发布:传智播客java百度云盘 编辑:程序博客网 时间:2024/05/22 04:29
<p>使用Magento Api修改商品Url路径的测试程序,希望对大家理解Api有帮助.</p>主要目的是通过Api去将商品的sku编号加到商品Url的后面,批量来更新Url,代码如下<a target=_blank target="_blank" href="http://www.hellokeykey.com/tag/api/">http://www.hellokeykey.com/tag/api/</a><a target=_blank target="_blank" href="http://www.mage-world.com/mapple-iphone-magento-theme.html">http://www.mage-world.com/mapple-iphone-magento-theme.html</a><?php$proxy = new SoapClient('http://www.yourdomain.com/api/soap/?wsdl');$session = $proxy->login('username', 'abc1234'); //获取全部商品$products = $proxy->call($session, 'product.list');//print_r($products);echo count($products);$i = 0;foreach($products as $product){$i++;if($i>249 && $i<300){echo $product[sku]."-Start<br />";//获取商品url$product_one = $proxy->call($session, 'product.info', $product[sku]);//print_r($proxy->call($session, 'product.info', $product[sku]));$new_url = $product_one[url_path].'-'.strtolower($product[sku]);echo $proxy->call($session, 'catalog_product.update', array($product[sku], array('url_path'=> $new_url)));echo $proxy->call($session, 'catalog_product.update', array($product[sku], array('url_key'=> $new_url))); //print_r($proxy->call($session, 'product.info', $product[sku]));//echo $new_url;echo $product[sku]."-OK-".$i."<br />";}//break;} //获取商品sku//$proxy->call($session, 'product.info', 'sku');
0 0
- IPHONE 模板块、Magento 使用Api将Sku添加到Url中 /Magento Free template iphone
- 深入理解Magento – 第三章 – Magento的布局(Layout),块(Block)和模板(Template)
- 深入理解Magento – 第三章 – Magento的布局(Layout),块(Block)和模板(Template).doc
- magento 发邮件[不用template/使用template]
- 第三章 – Magento的布局(Layout),块(Block)和模板(Template)1
- 第三章 – Magento的布局(Layout),块(Block)和模板(Template)2
- 3.Magento的布局(Layout),块(Block)和模板(Template)
- magento模板 -- 在magento中如何才能获取当前的主题的URL
- [Magento代码] 关联SKU到指定的分类下面
- Magento开发文档(四)Magento 布局、块 、模板
- Magento模块开发手册(四)Magento 布局、块 、模板
- Magento模块开发手册(四)Magento 布局、块 、模板
- magento-----直接在phtml中使用静态块----------------强悍!
- Magento中使用MemCached
- magento模板 -- 添加magento自带的tabs UI插件
- 添加asihttprequest框架到iPhone/iPad工程中使用
- magento模板
- Magento中添加TAB效果
- 如何设置Cisco交换机Vlan 并且监控特定网口的流量
- 002---三种简单博弈问题
- 【智能家居篇】wifi网络接入原理(上)——扫描Scanning
- QTP打开WinTree中的指定节点
- 眉目传情之并发无锁环形队列的实现
- IPHONE 模板块、Magento 使用Api将Sku添加到Url中 /Magento Free template iphone
- 2014.10.11第4讲项目2(1)
- C# 设置ComboBox下拉框内容
- poj 3468 线段树,延迟标记法
- 那么近,那么远
- 默认选中UITableView的一行
- Solr Replication (Wiki)
- 替换文件中的字符串
- iOS编程中视图控制器与视图类