0

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

Edited by ankit.4aug

3
Contributors
2
Replies
26
Views
4 Years
Discussion Span
Last Post by veedeoo
0

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.

Edited by LastMitch: grammer

0

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);
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.