1

At OnePageCheckout in magento under app/design/frontend/themename/template/checkout/onepage/shipping_method/availible.phtmlI found this entry

<?php echo $_rate->getMethodDescription(); ?>

It's the ul/li list with shipping costs

<ul class="shippingList">
  <li>One : 2,94&nbsp;€</li>
  <li>Two : 0,00&nbsp;€</li>
  ...
</ul>

How can I change that list to an table .. WHERE do I find the HTML? Thanks for your help. And by the way .. How can I find it in future, if I have only the Method in my phtml-file ..

2

What I do to find out where the code can be found: If you have access to your server via SSH, you can grep for it:

grep -r "getMethodDescription" * 2>/dev/null

Result is (file and containing text):

app/code/core/Mage/Sales/Model/Quote/Address/Rate.php: * @method string getMethodDescription()
app/code/core/Mage/Sales/Model/Quote/Address/Rate.php:                ->setMethodDescription($rate->getMethodDescription())
app/design/adminhtml/default/default/template/sales/order/create/shipping/method/form.phtml:                            <?php echo $this->escapeHtml($_rate->getMethodTitle() ? $_rate->getMethodTitle() : $_rate->getMethodDescription()) ?> -
app/design/adminhtml/default/default/template/sales/order/create/shipping/method/form.phtml:            <?php echo $this->escapeHtml($_rate->getMethodTitle() ? $_rate->getMethodTitle() : $_rate->getMethodDescription()) ?> -

So you see, there are 4 Results.

If I grep for the template (shipping/method/form.phtml) I can find out, what the block type is and in which layout xml file it's defined:

grep -r "shipping/method/form.phtml" * 2>/dev/null

Result:

app/design/adminhtml/default/default/layout/sales.xml:   <block type="adminhtml/sales_order_create_shipping_method_form" template="sales/order/create/shipping/method/form.phtml" name="form" />
app/design/adminhtml/default/default/layout/sales.xml:   <block type="adminhtml/sales_order_create_shipping_method_form" template="sales/order/create/shipping/method/form.phtml" name="form" />
app/design/adminhtml/default/default/layout/sales.xml:   <block type="adminhtml/sales_order_create_shipping_method_form" template="sales/order/create/shipping/method/form.phtml" name="form" />

So Block Type is adminhtml/sales_order_create_shipping_method_form.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.