4

Is there any way to do this :

I have two kinds of products, Handmade and ready women accessories. for handmade products I want a block under the price that tell the customer "This Product is 100% Handmade" and for the ready product nothing. So it will be only for the Handmade.

I already have a block but it is visible to all products, so I want it to be visible only for Handmade products.

Any Ideas ?

1

Create an attribute called handmade as a yes/no type and based on that data, display either the relevant text or the static block:

if($product->getHandmade()){
    echo $this->__("This Product is 100% Handmade");
}

To create the attribute go to Catalog > Attributes > Manage Attributes > Add New Attribute and create it with the following parameters:

enter image description here

Make sure that the Frontend properties dropdown for Visibile on Product Page is set to "Yes"

enter image description here

14
  • 1
    Why would you want to set 'Visible on product View Page on Frontend' to 'Yes'? This will make it appear in the 'Additional information' section. Even if you set this to 'No' it will still be loaded on the product page. The rest of the solution looks OK...so +1 – Marius Jun 27 '13 at 14:29
  • Thank seems great, ill do it and let you know the results! – xhxx Jun 27 '13 at 14:31
  • Why wouldn't you want it in additional information? – philwinkle Jun 27 '13 at 14:40
  • Can you please explain this part : based on that data, display either the relevant text or the static block: if($product->getHandmade()){ echo $this->__("This Product is 100% Handmade"); } – xhxx Jun 27 '13 at 14:42
  • this is the blcok that already shown in product page : <?php echo $this->getChildHtml('other');?> <?php if ($block_detail_product_page_1 = $this->getLayout()->createBlock('cms/block')->setBlockId('block_detail_product_page_1')->toHtml()): ?> <?php echo $block_detail_product_page_1; ?> <?php endif;?> – xhxx Jun 27 '13 at 14:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.