How to modify a list of warranty periods


At the present moment a list of warranty periods is hard-coded in the file. In order to modify it you need to do the following steps.

Instructions for Opencart 2

Find this file:
admin\model\catalog\product_warranties.php

Find this function in that file:
public function getWarrantyPeriods() {
$periods = array(
'30d' => '30 days',
'60d' => '60 days',
'90d' => '90 days',
'1y' => '1 year',
'2y' => '2 years',
'3y' => '3 years',
'5y' => '5 years',
'unlimited' => $this->language->get('Unlimited'),
);
And insert/remove lines similar to showed there. For example, if you need to add a new ‘10 years period’ you need to add a new line:
‘10y’ => ‘10 years’,

Please Wait!

Please wait... it will take a second!