Can not make operation because store is not exists in SOAP api for Add to cart products
-
07-10-2020 - |
Question
Can anyone guide how to solve below bug
'Can not make operation because store is not exists' in SOAP api for Add to cart products
I tried,
$proxy = new SoapClient('http://localhost/magento1.9/magento/api/soap/?wsdl');
$sessionId = $proxy->login('Aleena', 'teena1234');
$quoteId = $proxy->call( $sessionId, 'cart.create', array( 'magento_store' ) );
echo "<pre>";
print_r($quoteId); exit;
$arrProducts = array(
array(
"product_id" => "1",
"qty" => 2
),
array(
"sku" => "testSKU",
"quantity" => 4
)
);
$resultCartProductAdd = $proxy->call(
$sessionId,
"cart_product.add",
array(
$quoteId,
$arrProducts
)
);
Solution
- Login to the Magento admin.
- Go to the Catalog tab, and select Manage Categories.
- Click on the Add Root Category button on the left.
- On the right, for the Name, we'll enter Shoes.com. Set the dropdown to Yes for both Is Active and Is Anchor.
- Click the Save Category button.
- Go to the System tab and select Manage Stores.
- Click on the Create Website button.
- For the Name, we'll enter Shoes.com, and for the Code, we'll enter shoes.
- Click the Save Website button.
- Click on the Create Store button.
- For the Website, select Shoes.com from the dropdown. For the Name, we'll enter Main Store. For the Root Category, select the Shoes.com from the dropdown.
- Click on the Save Store button.
- Click on the Create Store View button.
- For the Store, select Main Store from the dropdown, making sure it's for the 15. Shoes.com website. For the Name, we'll enter English. For the Code, we'll enter shoes_en. For the Status, select Enabled from the dropdown.
- Click the Save Store View button.
- Go to the System tab and select Configuration. 18.For the Current Configuration Scope (located on the top left), change the dropdown menu from Default Config to Shoes.com.
- Select Web from the sidebar on the left under the General heading.
- For both the Unsecure and Secure sections, uncheck the Use default box next to the Base URL item, and enter the URL for your store, e.g. http://www.shoes.com/. Don't forget the trailing slash!
- Click the Save Config button.
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange