Hubert Perron
Hubert Perron

Reputation: 3022

Magento "Load customer quote error" cart error after creating downloadable products

I just ran a script to import some downloadable products in Magento 1.9.2.2. The script is pretty straightforward and seems to have successfully created my product and the associated download file when I look at the data in the admin panel.

The problem is when I try to add a downloadable product to my cart from the frontend, an error message appears that says « Load customer quote error ».

I must be missing some data and/or steps in my script because if I create the same product using the admin panel everything works fine.

Here's the part of script that handle the downloadable files:

$fileLink = ($storeId == self::STORE_ID_EN) ? $plan->file_en : $plan->file_fr;
$fileName = ($storeId == self::STORE_ID_EN) ? 'PDF Anglais' : 'PDF Français';

$linkModel = Mage::getModel('downloadable/link')->setData(array(
    'product_id' => $product->getId(),
    'sort_order' => $storeId,
    'number_of_downloads' => 0, // Unlimited downloads
    'is_shareable' => 2, // Not shareable
    'link_url' => $fileLink,
    'link_type' => 'url',
    'link_file' => '',
    'link_title' => $fileName,
    'sample_url' => '',
    'sample_file' => '',
    'sample_type' => '',
    'title' => $fileName,
    'use_default_title' => false,
    'default_price' => 0,
    'price' => 0,
    'store_id' => '',
    'website_id' => 1,
));

$linkModel->save();

Upvotes: 0

Views: 3154

Answers (1)

Hubert Perron
Hubert Perron

Reputation: 3022

Well, as always with Magento there was a conflict with a plugin that override the checkout process. I disabled BTS Checkout plugin and now everything back to normal.

Upvotes: 1

Related Questions