views:

106

answers:

2

Hi, we've got an almost-finished-ready-to-go magento shop, that has developed an annoying problem.

On the one page checkout, one of the steps has gone missing! The "shipping" tab, despite being present in the array of values inside the Mage_Checkout_Block_Onepage->getSteps() method, doesn't display. We've tried everything to figure out what is wrong, but for some reason, it just refuses to show, and isn't present in the HTML - so I'm certain that it's a server-side issue, rather than missing IDs in the page, or a javascript issue.

class Mage_Checkout_Block_Onepage extends Mage_Checkout_Block_Onepage_Abstract
{
    public function getSteps()
    {
        $steps = array();

        if (!$this->isCustomerLoggedIn()) {
            $steps['login'] = $this->getCheckout()->getStepData('login');
        }

        $stepCodes = array('billing', 'shipping', 'shipping_method', 'payment', 'review');

        foreach ($stepCodes as $step) {
            $steps[$step] = $this->getCheckout()->getStepData($step);
        }
        return $steps;
    }
// etc etc
}

(from /app/code/core/Mage/Checkout/Block/Onepage.php)

The code isn't customised at all, beyond a skin and some very light custom code inside local.. and it's driving us a little bit crazy! Any ideas? It was working up until recently.. We've tried a reinstall of our code over a fresh magento setup, but still..

e: there is a javascript error on the page when completing the "Billing Information" tab, but seems to be because Magento isn't loading the code correctly. The error is:

Error: $("shipping:same_as_billing") is null

Basically that the ID isn't there in the page, which coincides with what's happening.

ee: The form element does not exist. Comparing to an older version of the project which doesn't have this problem (nor the few weeks development sadly... =), this input is loaded inside the tab which doesn't display / load.. or anything.

eee: I'm still having an issue with this. Any suggestions really welcome. Thanks!

+1  A: 

The first thing I'd check is that Magento is set to capture shipping information (I seem to remember some configuration option to turn it off), and that the items you've added to the cart are normal items (not downloadable/virtual items, which shouldn't capture shipping information).


Based on your edit, it's looking for a form field which doesn't exist (seems to be the checkbox that lets a user choose whether to enter a separate billing address). Can you confirm that this form input exists and is sent w/ the form?

Joseph Mastey
I can't seem to track down the config option - not talking about allowing checkouts as a guest? Regarding the products, they're configurables.
danp
The form element does not exist. As I thought, it lives inside the hidden tab which isn't being loaded. I've got an older version of the project that isn't broken where I can see it.
danp
A: 

It turned out to be a problem with the layout. Going back to the original theme made the steps appear. Without knowing more about how magento works, I can't give any more detail, but hopefully this helps someone.

danp