0

I created a new product type image of bundled product and everything is work except the children product cannot insert the price in to database table salt_flat_quote_item and sale_flat_order_item. This turned out to give some problems in the order in the backend cannot show children price of this product. Do i have to call a function to get my children price?

this is my config file

<catalog>
<product>
<type>
  <formula translate="label" module="bank">
    <label>Formula Product</label>
    <model>bank/product_type_formula</model>
    <composite>1</composite>
    <allowed_selection_types>
      <simple/>
      <virtual/>
    </allowed_selection_types>
    <price_model>bank/product_type_formula_price</price_model>
    <index_data_retreiver>bank/catalogIndex_data_formula</index_data_retreiver>
    <index_priority>40</index_priority>
  </formula>
</type>
<options>
  <formula>
     <types>
        <select translate="label" module="bank">
           <label>Drop-down</label>
        </select>
        <radio translate="label" module="bank">
           <label>Radio Buttons</label>
        </radio>
        <checkbox translate="label" module="bank">
           <label>Checkbox</label>
        </checkbox>
        <multi translate="label" module="bank">
           <label>Multiple Select</label>
        </multi>
     </types>
  </formula>
</options>


Do I have to create more config or anything to extends bundle product.

Thank you very much.

2
  • I found the problem of this issue but still can't solved. because my new product type cannot insert eav price_type into table catalog_product_entity_int then I test to insert this data in the table by manual and child price of the product insert into table salt_flat_quote_item successful. I don't understand why my new product type is failed, anyone can help ? Commented Apr 24, 2013 at 4:16
  • What physical column (in the table) are you trying to add the child price to? What have you extended? We are going to see a lot more of your code to pinpoint the issue.
    – kab8609
    Commented May 9, 2013 at 17:24

1 Answer 1

1

You need to set the apply_to attribute property for your price_type attribute using the Mage_Catalog_Model_Resource_Setup class. You can see this being done by the native "custom" product types; for example, see app/code/core/Mage/Bundle/sql/bundle_setup/install-1.6.0.0.php:

$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'price_type', array(
    'type'              => 'int',
    'backend'           => '',
    'frontend'          => '',
    'label'             => '',
    'input'             => '',
    'class'             => '',
    'source'            => '',
    'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
    'visible'           => false,
    'required'          => true,
    'user_defined'      => false,
    'default'           => '',
    'searchable'        => false,
    'filterable'        => false,
    'comparable'        => false,
    'visible_on_front'  => false,
    'used_in_product_listing' => true,
    'unique'            => false,
    'apply_to'          => 'bundle', // <------------- That's the one.
    'is_configurable'   => false
));

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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