Php magento中的相关产品中缺少复选框
我用的是MagentoCE1.7。我的产品视图页面来自easytabs,因为我使用的是easytabs插件。此外,easytabs还提供了相关产品 问题是,大多数产品在相关产品列表中并没有复选框。我在admin中检查了他们的库存可用性、所需选项等。产品设置没有问题。我的代码在下面Php magento中的相关产品中缺少复选框,php,magento,checkbox,magento-1.7,Php,Magento,Checkbox,Magento 1.7,我用的是MagentoCE1.7。我的产品视图页面来自easytabs,因为我使用的是easytabs插件。此外,easytabs还提供了相关产品 问题是,大多数产品在相关产品列表中并没有复选框。我在admin中检查了他们的库存可用性、所需选项等。产品设置没有问题。我的代码在下面 <div class="box-collateral box-description"> <?php if($this->getItems()->getSize()): ?>
<div class="box-collateral box-description">
<?php if($this->getItems()->getSize()): ?>
<p class="test"><strong><?php echo $this->__('Check items to add to the cart or') ?> <a href="#" onclick="selectAllRelated(this);return false;"><?php echo $this->__('select all') ?></a></strong></p>
<ol class="tabsrelated">
<?php foreach($this->getItems() as $_item): ?>
<li <?php if($_item->isComposite() || !$_item->isSaleable()): ?> class="super-products"<?php endif; ?> id="tabsheight">
<div class="product-images">
<?php if(!$_item->isComposite() && $_item->isSaleable()): ?>
<span class="checkbox-container">
<?php if (!$_item->getRequiredOptions()): ?>
<input type="checkbox" class="related-checkbox left" id="related-checkbox<?php echo $_item->getId() ?>" name="related_products[]" value="<?php echo $_item->getId() ?>" />
<?php endif; ?>
</span>
<?php else: ?>
<span class="checkbox-container"> </span>
<?php endif; ?>
<a href="<?php echo $_item->getProductUrl() ?>"><img src="<?php echo $this->helper('catalog/image')->init($_item, 'thumbnail')->resize(150) ?>" alt="<?php echo $this->htmlEscape($_item->getName()) ?>" width="150" height="150" /></a>
</div>
<div class="product-details">
<a href="<?php echo $_item->getProductUrl() ?>"><?php echo $this->htmlEscape($_item->getName()) ?></a>
<div style="clear:both;">
<div class="related-price">
<?php echo $this->getPriceHtml($_item, true) ?>
</div>
<div class="related-shipping" style="line-height:25.5px">
+ Free Shipping
</div>
</div>
<?php if ($this->helper('wishlist')->isAllow()) : ?>
<div>
<a href="<?php echo $this->getAddToWishlistUrl($_item) ?>" class="link-cart"><?php echo $this->__('Add to Wishlist') ?></a>
</div>
<?php endif; ?>
</div>
</li>
<?php endforeach ?>
</ol>
class=“super products”id=“tabsheight”>
您的产品有定制选项吗?如果是这样,我认为不会显示复选框,因为在这种情况下,您必须转到产品并选择这些自定义选项,并且不能在相关产品区域直接选择它。是的,您是对的。产品具有所需字段的自定义选项。这就是为什么这些产品没有出现复选框。非常感谢。