YWS*_*WSW 1 magento configurable-product magento-1.7
我的可配置产品未显示在前端.在后端,Magento似乎将可配置产品列为0库存(尽管可配置产品的数量没有输入框).
请指教...
YWS*_*WSW 12
这是适合我的解决方案:
问题出在简单可配置产品(OrganicInternet)中使用的代码
我想要注意的是,我一次有两个单独的问题 - 上面,产品价格指数拒绝被索引(我收到了这条消息:无法初始化索引器进程,这被解释为SQLSTATE [21S01]:Insert值列表与列列表不匹配:1136列计数与第1行的值计数不匹配)
事实证明这两个问题都是相关的,并且在下面解决了这两个问题;)
更改:
$select->columns(array(
'entity_id' => new Zend_Db_Expr('e.entity_id'),
'customer_group_id' => new Zend_Db_Expr('pi.customer_group_id'),
'website_id' => new Zend_Db_Expr('cw.website_id'),
'tax_class_id' => new Zend_Db_Expr('pi.tax_class_id'),
'orig_price' => new Zend_Db_Expr('pi.price'),
'price' => new Zend_Db_Expr('pi.final_price'),
'min_price' => new Zend_Db_Expr('pi.final_price'),
'max_price' => new Zend_Db_Expr('pi.final_price'),
'tier_price' => new Zend_Db_Expr('pi.tier_price'),
'base_tier' => new Zend_Db_Expr('pi.tier_price'),
));
Run Code Online (Sandbox Code Playgroud)
至:
$select->columns(array(
'entity_id' => new Zend_Db_Expr('e.entity_id'),
'customer_group_id' => new Zend_Db_Expr('pi.customer_group_id'),
'website_id' => new Zend_Db_Expr('cw.website_id'),
'tax_class_id' => new Zend_Db_Expr('pi.tax_class_id'),
'orig_price' => new Zend_Db_Expr('pi.price'),
'price' => new Zend_Db_Expr('pi.final_price'),
'min_price' => new Zend_Db_Expr('pi.final_price'),
'max_price' => new Zend_Db_Expr('pi.final_price'),
'tier_price' => new Zend_Db_Expr('pi.tier_price'),
'base_tier' => new Zend_Db_Expr('pi.tier_price'),
'group_price' => new Zend_Db_Expr('pi.group_price'),
'base_group_price' => new Zend_Db_Expr('pi.group_price'),
));
Run Code Online (Sandbox Code Playgroud)
和
$outerSelect->columns(array(
'customer_group_id',
'website_id',
'tax_class_id',
'orig_price',
'price',
'min_price',
'max_price' => new Zend_Db_Expr('MAX(inner.max_price)'),
'tier_price',
'base_tier',
#'child_entity_id'
));
Run Code Online (Sandbox Code Playgroud)
至
$outerSelect->columns(array(
'customer_group_id',
'website_id',
'tax_class_id',
'orig_price',
'price',
'min_price',
'max_price' => new Zend_Db_Expr('MAX(inner.max_price)'),
'tier_price',
'base_tier',
'group_price',
'base_group_price',
#'child_entity_id'
));
Run Code Online (Sandbox Code Playgroud)
来源:主要的问题连同这个(但请注意,正确的代码是"base_group_price" =>新Zend_Db_Expr("pi.group_price"),而不是"P1"base_group_price" =>新Zend_Db_Expr(base_ group_price"),
更改
$this->cloneIndexTable(true);
Run Code Online (Sandbox Code Playgroud)
至
$this->clearTemporaryIndexTable();
Run Code Online (Sandbox Code Playgroud)
来源:这里
我花了几个小时来弄明白这一点所以我写了这篇文章,以帮助其他人浪费所有的时间.
祝你好运!