Im building a custom carrier and i need to show this one only when the cart total is less than the number added on dashboard, i have done all of that, but i have some issues getting a claer value from the totals on the cart, this is my code :

$items = $request->getAllItems();
        $quoteId = false;
         foreach ($items  as $item) 
             $quoteId = $item->getQuoteId();
         $quote = $this->getCurrentQuote($quoteId);
         $totals = $quote->getTotals();

This is what im getting:


And the real value should be: 229.937

So for example, if the value needs to be more than 300 i cant handle using that value.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.