I'm operating multiple websites(storeviews) and i want to bring all simple products on A website although it doesn't be checked to appear on A
website on product-website tab.
There would be only grouped products on A website and then click them, i want to show all of simple products associated with the grouped product even they are not a member of A
website.
Literally, I'd like to implement what shows in Magento Admin Page on A website catalog page.
So, I want to modify grouped.phtml file and it needs that a product(grouped product) that this module calls have to call all of associated simple product regardless of checking this website or not. Is there a way to implement this ? Please share your opinion.
app/design/frontend/base/default/template/catalog/product/view/type/Grouped.phtml
<?php $this->setPreconfiguredValue(); ?>
<?php $_product = $this->getProduct(); ?>
<?php $_associatedProducts = $this->getAssociatedProducts(); ?>
<?php $_hasAssociatedProducts = count($_associatedProducts) > 0; ?>
<?php if ($this->displayProductStockStatus()): ?>
<?php if ($_product->isAvailable() && $_hasAssociatedProducts): ?>
<p class="availability in-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('In stock') ?></span></p>
<?php else: ?>
<p class="availability out-of-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('Out of stock') ?></span></p>
<?php endif; ?>
EDIT
/wh-clone/app/code/local/Kbethos/AllProducts/Block/Product/View/Type/Grouped.php
<?php
class Kbethos_AllProducts_Block_Product_View_Type_Grouped extends Mage_Catalog_Block_Product_Abstract
{
/**
* Revert getProduct functionality to parent:parent
*
* @see Mage_Catalog_Block_Product_Abstract
* @return null|Mage_Catalog_Model_Product
*/
/*
public function getProduct()
{
if (!$this->hasData('product')) {
$this->setData('product', Mage::registry('product'));
}
return $this->getData('product');
}
*/
}
app/code/local/Kbethos/AllProducts/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<Kbethos_AllProducts>
<version>0.1.0</version>
</Kbethos_AllProducts>
</modules>
<global>
<blocks>
<allproducts>
<class>Kbethos_AllProducts_Block</class>
</allproducts>
</blocks>
<helpers>
<allproducts>
<class>Kbethos_AllProducts_Helper</class>
</allproducts>
</helpers>
</global>
</config>
app/design/frontend/default/modern/layout/catalog.xml
<!-- 20170608 mj edit - add new block for grouped -->
<PRODUCT_TYPE_grouped translate="label" module="catalog">
<label>Catalog Product View (Grouped)</label>
<reference name="product.info">
<block type="kbethos/allproducts_block" name="product.info.grouped" as="product_type_data" template="catalog/product/view/type/grouped.phtml">
<block type="core/text_list" name="product.info.grouped.extra" as="product_type_data_extra" translate="label">
<label>Product Extra Info</label>
</block>
</block>
</reference>
</PRODUCT_TYPE_grouped>
<!-- 20170608 mj edit - add new block for grouped -->