Tiago Sampaio

main ai engineering career

engineering

1 min read

Verificar se Existe um Método de Entrega Disponível no Magento

PHP
Utilize o código abaixo para verificar no Magento se existe algum método de entrega disponível.
[php]
public function haveShippingMethods()
{
	if (count(Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->getShippingRatesCollection())) {
		return true;
	}
	return false;
}
[/php]

Até a próxima!
Tiago Sampaio

Written by

TS

Tiago Sampaio

Adobe Commerce & Magento 2 Expert

Senior developer with 15+ years building software. Writes practical fixes for Magento 2 and Adobe Commerce, and honest notes on growing as a developer.

$ git remote add inbox

Get new commits by email

New posts from both branches, engineering and career. No spam, unsubscribe any time.