- 浏览: 152000 次
- 性别:
- 来自: 上海
最新评论
-
kirenenko04:
我没要学.学你妈的Demandware,被老板娘逼的.我现在去 ...
Demandware Training -
itxinmeng:
不错,现在做demandware的不多哦,可以交流下下..
Demandware Training
文章列表
只有一种选项的简单商品和可配置商品
例如:某鞋子有尺寸这一可选项: (尺码:35,36,37,38,39)
主要是先创建5个拥有者写属性值的简单商品
然后创建一个可配置商品。
配置好可配置商品的配置项,将简单商品关联到这个可配置商品
/**
* 导入有option value 的简单商品
*/
public function importMixProduct() {
//获取这种类型的商品ID;
$read= Mage::getSingleton('core/resource')->getConnection('core_read'); ...
public function importOnlySimpleProduct() {
$read= Mage::getSingleton('core/resource')->getConnection('core_read');
$sql = "SELECT `mid` AS `product_id`
FROM `old_data_import`
WHERE NOT `mid` IN
(SELECT `product_id` FROM `old_product_option_value` GROUP BY `product_id ...
只展示一级目录的导入
$root_cate_id = 2;
if (!$this->existsCate(trim($row['mid']))) {
$cate = new Mage_Catalog_Model_Category();
$cate->setName($name);
$cate->setUrlKey(trim($row['mid']));
$cate->setIsActive(1);
$parentCategory = Mage::getModel('catalog/category')->load($root_cate_i ...
/**
* 导入某个商品图片,先清空再导入
* @param unknown $images 远程图片地址数组
* @param unknown $sku 商品sku.
*/
public function importProductImages($images,$sku) {
//remove All images
$product = Mage::getModel('catalog/product')->loadByAttribute('sku',$sku);
$product = Mage::getModel('catalog/pro ...
/**
* 添加关联商品到指定商品
*/
public function addRelatedProducts($product_id,$skus) {
$param = array();
foreach ($skus as $key=>$sku) {
$related_product = Mage::getModel('catalog/product')->loadByAttribute('sku',$sku);
if ($related_product) {
$ ...
INSERT INTO `alsobuy_order_item` (`person`,`product_id`,`times`)
SELECT * FROM (
(
SELECT CONVERT(o.customer_id,CHAR) AS `person`,
oi.product_id,
FLOOR(UNIX_TIMESTAMP(DATE_FORMAT(o.created_at,'%Y-%m-%d %H:00:00'))/(3600*1)) AS `time`
FROM `sales_flat_order` AS o
LEFT OUTER ...
首先看一下三个按钮,
是用UL LI标签 展示,并且用一个隐藏的元素进行记录:
<div class="store_select">
<?php $provinces = $this->getAllProvince();?>
<?php echo $this->__('请前往')?>
<ul name="store_province_ul" id="store_province_ul" class="store_province_ul&qu ...
$config = Mage::getStoreConfig('section_name/group/field'); //value
$config = Mage::getStoreConfig('section_name/group'); //array
http://www.ibm.com/developerworks/cn/xml/x-simplexml.html
<?php
require_once 'abstract.php';
class Mage_Shell_DifferentSizeSearch extends Mage_Shell_Abstract
{
/**
* Run script
*
*/
public function run()
{
$write = Mage::getSingleton('core/resource')->getConnection('core_write');
...
Drupal 数据库配置连接
- 博客分类:
- Drupal
1.删除数据库配置文件:/sites/default/settings.php
2.用浏览器访问本地路径进行安装
3.安装的时候指定需要配的数据库
/sites/default/settings.php
$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'ec2china',
'username' => 'root',
'password' => '',
...
1.在本地目录创建Grid文件,用于覆盖后台订单列表的Grid
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http:// ...
TRUNCATE TABLE `catalog_product_bundle_option`;
TRUNCATE TABLE `catalog_product_bundle_option_value`;
TRUNCATE TABLE `catalog_product_bundle_selection`;
TRUNCATE TABLE `catalog_product_entity_datetime`;
TRUNCATE TABLE `catalog_product_entity_decimal`;
TRUNCATE TABLE `catalog_product_entity_gal ...
深入PrestaShop核心开发
- 博客分类:
- PrestaShop
1.数据库结构表名都是以_ps前缀开头,这个可以再安装过程中进行指定所有表名是小写的,单词用下划线_分割当一个表建立了两个实体的连接,两个实体的名字会再表名中被提到,举个例子。ps_category_product连接了商品和他们的分类一些细节;用id_lang 字段存储语言关联一条记录用id_shop字段存储商店关联一条记录表包含翻译必须用_lang结尾, 例如ps_product_lang包含所有关于ps_product表的翻译表包含记录一个指定商店连接,必须以_shop结尾,例如,ps_category_shop包含每个类别取决于店面的位置。0bjectModel类这个主要对象,在Pr ...
1. Get your products in 3 different collections using addAttributeToFilter where attribute name is type_id. For the condition you can use
Mage_Catalog_Model_Product_Type::TYPE_SIMPLE, Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE and Mage_Catalog_Model_Product_Type::TYPE_GROUPED.
Example:
...