Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8974499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:41:39+00:00 2026-06-15T18:41:39+00:00

I have added bundled products by fetching data from the CSV. Products added in

  • 0

I have added bundled products by fetching data from the CSV. Products added in this manner are visible in admin panel but not in front end. I have gone through all the threads but got no solution. Please help me with this situation.

require_once($magentoPath . 'includes/config.php');
  require_once($magentoPath . 'app/Mage.php');
  $storeID = 1;
  $websiteIDs = array(1);
  $cats = array("12");

  Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);

  $productCheck = Mage::getModel('catalog/product');

  $p = array(
    'sku_type' => 0,
    'sku' => '687',
    'name' => "BarProduct",
    'description' => 'Foo',
    'short_description' => 'Bar',
    'type_id' => 'bundle',
    'attribute_set_id' => 4,
    'weight_type' => 0,
    'visibility' => 4,
    'price_type' => 0,
    'price_view' => 0,
    'status' => 1,
    'created_at' => strtotime('now'),
    'category_ids' => $cats,
    'store_id' => $storeID,
    'website_ids' => $websiteIDs
  );

  $productCheck->setData($p);
  Mage::register('product', $product);
  $optionRawData = array();
  $optionRawData[0] = array(
    'required' => 1,
    'option_id' => '',
    'position' => 0,
    'type' => 'select',
    'title' => 'FooOption',
    'default_title' => 'FooOption',
    'delete' => '',
  );

  $selectionRawData = array();
  $selectionRawData[0] = array();
  $selectionRawData[0][] = array(
    'product_id' => 337,
    'selection_qty' => 1,
    'selection_can_change_qty' => 1,
    'position' => 0,
    'is_default' => 1,
    'selection_id' => '',
    'selection_price_type' => 0,
    'selection_price_value' => 0.0,
    'option_id' => '',
    'delete' => ''
  );
Mage::register('productCheck', $productCheck);
 Mage::register('current_product', $productCheck);
 $productCheck->setCanSaveConfigurableAttributes(false);
 $productCheck->setCanSaveCustomOptions(true);
  // Set the Bundle Options & Selection Data
  $productCheck->setBundleOptionsData($optionRawData);
  $productCheck->setBundleSelectionsData($selectionRawData);
  $productCheck->setCanSaveBundleSelections(true);
  $productCheck->setAffectBundleProductSelections(true);

  $productCheck->save();
  $indexer = Mage::getSingleton('index/indexer');
foreach ($indexer->getProcessesCollection() as $process) {
    $process->reindexAll();
}
  • Please note that wherever If I re-save my product through admin panel it starts displaying on front-end.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T18:41:40+00:00Added an answer on June 15, 2026 at 6:41 pm

    Mage::register('product', $product); => Mage::register('product', $productCheck);

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have added an extra field Specification in Catalog->Product->Data tab. This text is stored
I have added the sdk files like dropbox website says, but I can't figure
I have added a Bundled Product in Magento programmatically, using all the options /
I have followed this tutorial to configure apn_on_rails but I am getting the following
I have checked this link and implemented the following but i am still getting
I have added the split view controller on a view controller as this: rootViewController
I have a bundled Product that contains 3 virtual products as options. I have
I'm Using Magento 1.5.1.0 and I have programmatically added bundle products (directly into the
This error is a nightmare, I have not been able to figure out why
I have Panel with set of fields,Those fields have some bundled validation rules and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.