Hi
I was looking magento tutorial there I found following lines

<input type="text" name="custom[ssn]" value="<?php echo $this->htmlEscape($this->getQuote()->getSsn()) ?>" title="<?php echo $this->__('SSN') ?>" class="input-text required-entry" id="billing:ssn" />
                    </div>

can you please explain me what do you mean by

$this->getQuote()->getSsn()

tutorial link is
http://www.excellencemagentoblog.com/magento-add-custom-fields-checkout-page

Member Avatar for LastMitch

can you please explain me what do you mean by

The whole tutorial is a checkout.

Since you got that code snippet from the link and you don't understand how it works and have questions just post the questions on there because it's the author who wrote the code.

LastMitch is perfectly correct.. Ask the author first..

To give you the general idea of what it is, it can be explain as simple as this..

$this->class()->the_method_of_this_class();

This process is also called chaining.. However, if it is not a class, but instead they are both methods of the same class, then the expression you have provided is perfectly wrong. Because $this->class() cannot be called within other class unless it is extended or it is an statically declared from somewhere. If they are both methods of the same class or the other is method of a parent class then the declaration should be somethin like this.

$this->method($this->method_1(),$this->method_2());

Which is simply an elaboration of nothing, but equal to

some_function($var_1,$var_2);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.