Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Some questions
 
hogehoge
Jr. Member
 
Total Posts:  10
Joined:  2008-05-06
 

1. How can I get the subtotal of Cart in the base currency?

At frontend, it was available with this code:

$subtotal Mage::getModel('sales/quote')->load(Mage::getSingleton('checkout/session')->getQuoteId())->getBaseSubtotal();

However, as an administrator, it couldn’t be brought out with:

$subtotal Mage::getModel('sales/quote')->load(Mage::getSingleton('adminhtml/session_quote')->getQuoteId())->getBaseSubtotal();

I tried this:

$totals Mage::getSingleton('adminhtml/session_quote')->getQuote()->getTotals();
$subtotal $totals['subtotal']->getValue();
but just ended up coming out in the current currency, and

$subtotal Mage::getSingleton('adminhtml/session_quote')->getQuote()->getBaseSubtotal();
failed too.

Does anyone have any advice for this?
for your information, the version of magento is 1.1.2.

In the version 1.1.1
At frontend, it was available with this code:

$subtotal Mage::getModel('checkout/cart')->getQuote()->getShippingAddress()->getBaseSubtotal();
At admin, it was available with this code:
$subtotal Mage::getModel('adminhtml/sales_order_create')->getQuote()->getShippingAddress()->getBaseSubtotal();

But, The above-mentioned code did not operate in the version 1.1.2.

It is necessary in my rewardpoints module.

UPDATE
It’s solved.

At frontend:

$subtotal Mage::getModel('checkout/cart')->getQuote()->getOrigData('base_subtotal');
At admin:
$subtotal Mage::getSingleton('adminhtml/session_quote')->getQuote()->getOrigData('base_subtotal');

Thanks.

2. How can I control inventory using any other protocols than the default one?

I tried to add the record such as
stock_id : 2
stock_name : Software License
in the cataloginventory_stock table of mysql, but got stuck here.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top