2014年10月

win10也上了几天了,今天抽空在虚拟机上装了,体验了一下。个人感觉还好,等出了正式版可以考虑更换,风格还是跟win8相似,难看的扁平化,大家最关心的开始菜单开始有些变化了,在传统的开始菜单边上又加上了一些常用的小工具,因为还得加班,仅仅浏览了一下。

先上图

安装1 安装2 安装3 安装4 安装5 安装6 安装7 安装8 安装9 安装10 安装11

[caption id="attachment_151" align="aligncenter" width="300"]这个界面可以变色,其他的没什么特别的 这个界面可以变色,其他的没什么特别的[/caption]

安装完成

到这里安装完成了。

界面1 开始菜单 设置 我的电脑

magento订单状态流程:

1. 新订单

state : new
status : pending

2. 配送后
state : processing
status : processing

3. 收款后
state : processing
status : processing

4. 订单完成
state : complete
status : complete

5. 订单取消
state : canceled
status : canceled

6. 订单关闭
state : closed
status : closed

7. 订单挂起
state : holded
status : holded

先整理一下,后面在更新

网上这篇文章很多了,当是转载一下,留个备份。
通过这个实例可以学到很多有关Magento的知识。

<?php 
require_once 'app/Mage.php'; 
Mage::app('default'); //初始化程序,设置当前店铺 
$store = Mage::app()->getStore('default');

//通过电子邮件获取用户,当然也可以不获取,创建guest订单
$customer = Mage::getModel('customer/customer');
$customer->setStore($store);
$customer->loadByEmail('[email protected]');

//初始化Quote,Magento的订单是通过Quote来转化过去的
$quote = Mage::getModel('sales/quote');
$quote->setStore($store);
$quote->assignCustomer($customer); //如果有用户则执行这个

$product1 = Mage::getModel('catalog/product')->load(166); /* HTC Touch Diamond */
$buyInfo1 = array('qty' => 1);

$product2 = Mage::getModel('catalog/product')->load(18); /* Sony Ericsson W810i */
$buyInfo2 = array('qty' => 3);

//添加商品到Quote
$quote->addProduct($product1, new Varien_Object($buyInfo1));
$quote->addProduct($product2, new Varien_Object($buyInfo2));

//设置账单和收货品地址
$billingAddress = $quote->getBillingAddress()->addData($customer->getPrimaryBillingAddress());
$shippingAddress = $quote->getShippingAddress()->addData($customer->getPrimaryShippingAddress());

//设置配送和支付方式
$shippingAddress->setCollectShippingRates(true)->collectShippingRates()->setShippingMethod('flatrate_flatrate')->setPaymentMethod('checkmo');
$quote->getPayment()->importData(array('method' => 'checkmo'));

//Quote计算运费
$quote->collectTotals()->save();

//将Quote转化为订单
$service = Mage::getModel('sales/service_quote', $quote);
$service->submitAll();
$order = $service->getOrder();

/***至此订单已经成功生成,下面是注册付款信息***/
$invoice = Mage::getModel('sales/service_order', $order)->prepareInvoice();
$invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_ONLINE);
$invoice->register();
$transaction = Mage::getModel('core/resource_transaction')->addObject($invoice)->addObject($invoice->getOrder());