I have an extension that removed the billing address step in checkout, but my step # now is:
step 1: checkout
step 3: payment
can I change the step # via language file?
OC version not posted. However,
catalog/controller/checkout/checkout.php file. Each number you see at the end of each lines represents the step number.
Code: Select all
$data['text_checkout_option'] = sprintf($this->language->get('text_checkout_option'), 1);
$data['text_checkout_account'] = sprintf($this->language->get('text_checkout_account'), 2);
$data['text_checkout_payment_address'] = sprintf($this->language->get('text_checkout_payment_address'), 2);
$data['text_checkout_shipping_address'] = sprintf($this->language->get('text_checkout_shipping_address'), 3);
$data['text_checkout_shipping_method'] = sprintf($this->language->get('text_checkout_shipping_method'), 4);
if ($this->cart->hasShipping()) {
$data['text_checkout_payment_method'] = sprintf($this->language->get('text_checkout_payment_method'), 5);
$data['text_checkout_confirm'] = sprintf($this->language->get('text_checkout_confirm'), 6);
} else {
$data['text_checkout_payment_method'] = sprintf($this->language->get('text_checkout_payment_method'), 3);
$data['text_checkout_confirm'] = sprintf($this->language->get('text_checkout_confirm'), 4);
}
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
The last indicated question on the first post was about:
which the answer is no. The step number is located in the controller itself rather than the language file. The language file only contains the %s with the defined text but does not contain the step number.can I change the step # via language file?
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I still recommend changing it in the language file itself, and hard-coding it in there (in place of the %s strings). Editing a language file is preferable to editing a controller file, since controller file edits can conflict with other modifications, and are harder to redo if you upgrade OpenCart in the future. In my experience, language file edits tend to be safer than controller file edits.
Who is online
Users browsing this forum: alzoriki and 167 guests