本博文是钥匙博客的重要文章索引页,帮助大家通过我的博客学习magento。本页内容也在不停的更新,完善中。也可以通过本页内容对我博客内容有个大概的了解。
请使用google搜索获取本站的magento文章信息,或者订阅本博客的RSS。
大家好我是钥匙,欢迎大家来到我的博客学习magento的使用与开发。
本博文是钥匙博客的重要文章索引页,帮助大家通过我的博客学习magento。本页内容也在不停的更新,完善中。也可以通过本页内容对我博客内容有个大概的了解。
请使用google搜索获取本站的magento文章信息,或者订阅本博客的RSS。
Filed under - magento, magento其它 32 Comments so far. Add yours now
Magento批量导入是很多人关心的问题,因为面对成千上万件商品需要管理,还是批量操作方便些。
对于magento自带的批量导入功能,只能算是基础的导入功能,不包含多张图片与自定义选项(例如:尺码,颜色的选择)的功能。
现在有个插件可以帮助大家完成多张图片与自定义选项的批量导入。
此插件在插件说明部分详细说明了如何操作并且给出了CSV的示例文件,大家正好可以使用此CSV文件了解批量导入表有哪些属性,如何书写。
CSV文件编辑是要保持文件编码和分号逗号使用规律,建议试验没有问题后再批量的编辑商品,并可以时不时的在测试站测试下。CSV编辑器推荐:http://csved.sjfrancke.nl/ 用着感觉很不错
网上批量导入文章很多,详细操作大家可以google下,有时间我出个视频。
导入的自定义属性,比如导入尺码,存在尺码按照字母顺序排的问题,这是这个插件需要fix的地方。
Filed under - magento, magento wiki, magento使用教程 2 Comments so far. Add yours now
今天设置Magento的后台的 run Compilation process 一下子网站就挂了,报警信息如下。Compilation的位置在Magento后台System->Tools->Compilation,如上图。Compilation主要是用来加速magento运行,具体内容请大家google“Magento Compilation”
Strict Standards: include_once() [function.include-once]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /home/magentok/domains/magentokey.com/public_html/app/Mage.php on line 36 Warning: include_once(Mage_Core_functions.php) [function.include-once]: failed to open stream: No such file or directory in /home/magentok/domains/magentokey.com/public_html/app/Mage.php on line 36 Strict Standards: include_once() [function.include-once]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /home/magentok/domains/magentokey.com/public_html/app/Mage.php on line 36 Warning: include_once() [function.include]: Failed opening 'Mage_Core_functions.php' for inclusion (include_path='/home/magentok/domains/magentokey.com/public_html/includes/src:.:/usr/local/lib/php') in /home/magentok/domains/magentokey.com/public_html/app/Mage.php on line 36 Strict Standards: include_once() [function.include-once]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /home/magentok/domains/magentokey.com/public_html/app/Mage.php on line 37 Warning: include_once(Varien_Autoload.php) [function.include-once]: failed to open stream: No such file or directory in /home/magentok/domains/magentokey.com/public_html/app/Mage.php on line 37 Strict Standards: include_once() [function.include-once]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /home/magentok/domains/magentokey.com/public_html/app/Mage.php on line 37 Warning: include_once() [function.include]: Failed opening 'Varien_Autoload.php' for inclusion (include_path='/home/magentok/domains/magentokey.com/public_html/includes/src:.:/usr/local/lib/php') in /home/magentok/domains/magentokey.com/public_html/app/Mage.php on line 37 Strict Standards: main() [function.main]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /home/magentok/domains/magentokey.com/public_html/app/Mage.php on line 53 Fatal error: Class 'Varien_Autoload' not found in /home/magentok/domains/magentokey.com/public_html/app/Mage.php on line 53
之前没有遇到过这个情况,google了一下,也没有找到可行的解决办法,于是留言给simplehelix.com的技术支持,让他们帮我看下,一会儿工夫他们就给解决了,客服留言如下:
Hello,
I have fixed the error and the site is now back up. I added a line to your .htaccess for the timezone error. For the remaining errors I did this:
I located this file - /includes/config.php
I then swapped out this:
define('COMPILER_INCLUDE_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'src');
#define('COMPILER_COLLECT_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'stat');
For this:
#define('COMPILER_INCLUDE_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'src');
define('COMPILER_COLLECT_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'stat');
Also per a forum post, it was suggested to - "don’t use the ‘enable’ button first, please use the ‘Run compilation process’ button first and then use the ‘enable’ button". I am hoping that will help.
Please let us know if you need any further assistance.
Thank you,
从客服的留言我们知道他给修改了两处设置,所以大家遇到同样的报警信息可以像客服说的进行修改。客服没有提到的就是网站挂了,大家要在修改后,手动清空缓存文件,再运行。
客服也提到,当我们开启Magento Compilation的时候,记得是先点击‘Run compilation process’ 按钮,然后再点击“enable”。
Filed under - magento, magento wiki, magento使用教程 No Comments so far. Add yours now
如上图,magento安装需要的文件有两个,一个是 magento-1.6.1.0.tar.gz 他是magento的安装文件,1.6.1.0标明安装文件是1.6.1.0版本。
magento-sample-data-1.6.1.0.tar.gz 这个文件是magento的演示数据压缩包,演示数据顾名思义,是为了做演示用的,一般不需要安装。如果你需要练习使用magento,或者做模板开发,那么这个演示数据还是很方便的。这个演示数据压缩包解压后,文件中有一个sql文件,如果要装显示数据,那么可以将这个导入数据库,在安装magento的时候使用这个数据库。还有一个media文件夹,就是magento的根目录的media文件,直接用这个media覆盖magento的那个media。这样演示数据和演示数据的商品图片就都有了。
1.解压Magento安装文件,将解压后的文件放到域名的根目录即可,这就完成了Magento安装的文件部署
我们可以看到解压后的magento文件根目录有app文件夹,media文件夹,var文件夹,skin文件夹等很多文件与文件夹。
app中存放了magento的核心文件,和模板结构文件。
skin文件存放的主要是模板样式文件。
media文件夹存放的是网站的商品图片。
var文件夹存放的会是magento的缓存文件和其它文件。
2.然后就是要设置文件权限问题了。
其实大家可以不必管文件权限问题,直接进入magento的安装过程,如果文件权限不对,安装过程会有提示。提示你哪个文件需要写权限就去设置下,然后刷新页面即可。
3.访问域名进入安装页面,设置Magento系统的参数,时间,货币,网站用户名,密码等。最重要的一项就是数据库的设置,要填写设置好的数据库名字,密码,表前缀,表前缀这个东西可以写也可以不写。写了,magento的所有表会有个表前缀。
4.安装完毕,试试吧
Filed under - magento, magento服务器, magento使用教程 3 Comments so far. Add yours now
写了段更新Magento tier price的代码,供初学者参考。此代码主要是用来改变Magento tier price的用户组。代码如下
//初始化Api连接
$proxy = new SoapClient('http://www.网址.com/api/soap/?wsdl');
$sessionId = $proxy->login('key', '123456');
function changetierprices($sku,$proxy,$sessionId)
{
// Get tier prices
//$sku ='JScd122';
$tierPrices = $proxy->call($sessionId, 'product_tier_price.info', $sku);
//判断是否有tier prices
if(count($tierPrices))
{
foreach ($tierPrices as $key1=>$value1)
{
if($value1[customer_group_id] == '1')
{
//修改tier price的组
$tierPrices[$key1]['customer_group_id'] = 'all';
}
}
//update
$proxy->call($sessionId, 'product_tier_price.update', array($sku, $tierPrices));
//echo '<p>update</p>';
}
else
{
echo '<p>this one no tierprice,sku='.$sku.'</p>';
}
}
Filed under - magento, magento wiki 2 Comments so far. Add yours now
十一 25, 2011
No Comments