0

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();
             break;
         }
    
         $quote = $this->getCurrentQuote($quoteId);
    
         $totals = $quote->getTotals();

This is what im getting:

229834.0000

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.

Ideas?

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.