博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
多网店下修改价格倍数
阅读量:4200 次
发布时间:2019-05-26

本文共 616 字,大约阅读时间需要 2 分钟。

1.新建一个page 2{
{block type="catalog/product_list" name="fdfsfd" template="ter/ter.phtml"}} 3新建ter/ter.phtml文件 里面包含如下代码: getStoreId(); Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); // $collection = Mage::getResourceModel('catalog/product_collection')->load(); foreach($collection as $items){ $product = Mage::getModel('catalog/product')->load($items->getId()); $product->setPrice(round($product->getPrice()*1.2)); if($product->getSpecialPrice()){ $product->setSpecialPrice(round($product->getSpecialPrice()*1.2)); } $product->save(); } // Mage::app()->setCurrentStore($currentStore); ?> 4执行这个page。

转载地址:http://dedli.baihongyu.com/

你可能感兴趣的文章
为什么我们的自动化测试“要”这么难
查看>>
LoadRunner性能脚本开发实战训练
查看>>
测试之途,前途?钱途?图何?
查看>>
测试设计与测试项目实战训练
查看>>
HP Sprinter:敏捷加速器
查看>>
单元测试培训PPT
查看>>
adb常用命令
查看>>
通过LR监控Linux服务器性能
查看>>
通过FTP服务的winsockes录制脚本
查看>>
LRwinsocket协议测试AAA服务器
查看>>
Net远程管理实验
查看>>
反病毒专家谈虚拟机技术 面临两大技术难题
查看>>
几种典型的反病毒技术:特征码技术、覆盖法技术等
查看>>
性能测试一般过程与LR性能测试过程
查看>>
Software Security Testing软件安全测试
查看>>
SQL注入漏洞全接触--进阶篇
查看>>
SQL注入漏洞全接触--高级篇
查看>>
SQL注入法攻击一日通
查看>>
菜鸟入门级:SQL注入攻击
查看>>
用vbs来写sql注入等80端口的攻击脚本
查看>>