OrdaSoft forum
Welcome, Guest
Please Login or Register.    Lost Password?
Year of issue where to add more (0 viewing) 
VehicleManager component support
Go to bottom Favoured: 1
TOPIC: Year of issue where to add more
#7644
info@multiapp.gr (User)
Fresh Boarder
Posts: 12
graphgraph
User Offline Click here to see the profile of this user
Year of issue where to add more 3 Years, 7 Months ago Karma: 0  
Hi,

Where to add more year of issue or even remove some?
 
Logged Logged  
  The administrator has disabled public write access.
#7652
admin (Admin)
Admin
Posts: 4861
graph
User Offline Click here to see the profile of this user
Re:Year of issue where to add more 3 Years, 7 Months ago Karma: 61  
Hello,

For create Year in Vhicle manager responsible code:

Code:

<td valign="top" align="right">
                <strong><?php echo _VEHICLE_MANAGER_LABEL_ISSUE_YEAR;?>:</strong>
            </td>
            <td align="left">
              <select name="year" id="year" class="inputbox" size="1" >

              <?php
                print_r("<option value=''>");
                print_r(_VEHICLE_MANAGER_OPTION_SELECT);
                print_r("</option>");
                $num=1900;
                for($i= 0;$num<=date('Y');$i++)
                {
                  print_r("<option value="");
                  print_r($num);
                  print_r(""");
                  if($num == $row->year){
                    print(" selected= "true" ");
                  }
                  print_r(">");
                  print_r($num);
                  print_r("</option>"); 
                  $num++;
                }
              ?>
              </select>

it located in admin part at file:
{yours site}/administrator/components/com_vehiclemanager/admin.vehiclemanager.html.php

as you see we take Year - from current site date.

Thanks,
OrdaSoft team
 
Logged Logged  
  The administrator has disabled public write access.
#8987
seoa (User)
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
Re:Year of issue where to add more 3 Years, 3 Months ago Karma: 0  
Ok, so how do you add model years for a year that hasn't happened yet? My customer is selling 2014 models, how do I insert that??
 
Logged Logged  
  The administrator has disabled public write access.
#9001
admin (Admin)
Admin
Posts: 4861
graph
User Offline Click here to see the profile of this user
Re:Year of issue where to add more 3 Years, 3 Months ago Karma: 61  
Hello,

Ok, so how do you add model years for a year that hasn't happened yet in vehicle manager? My customer is selling 2014 models, how do I insert that??

You need in file:
{site}/administrator/components/com_vehiclemanager/vehiclemanager.html.php

find code look like:

Code:

              $num=1900;
              for($i= 0;$num<=date('Y');$i++)
                {
                  print_r("<option value="");
                  print_r($num);
                  print_r(""");
                  if($num == $row->year){
                    print(" selected= "true" ");
                  }
                  print_r(">");
                  print_r($num);
                  print_r("</option>"); 
                  $num++;
                }



replace row
Code:

for($i= 0;$num<=date('Y');$i++)


to
Code:

for($i= 0;$num<=date('Y')+1;$i++)


Thanks,
OrdaSoft team
 
Logged Logged  
  The administrator has disabled public write access.
#18910
bshea (User)
Fresh Boarder
Posts: 11
graphgraph
User Offline Click here to see the profile of this user
Re:Year of issue where to add more 8 Months, 2 Weeks ago Karma: 0  
This code only worked when I updated vehiclemanager.html.php in administrator/compontents/com_vehiclemanger

Code:

for($i= 0;$num<=date('Y')+1;$i++)
 
Logged Logged  
  The administrator has disabled public write access.
#18915
Taras (Admin)
Admin
Posts: 2858
graphgraph
User Offline Click here to see the profile of this user
Re:Year of issue where to add more 8 Months, 2 Weeks ago Karma: 55  
Hello,

That code was for old version of component.

So, do you have any other question?

Do you need any help?

Thanks,
Taras
 
Logged Logged  
  The administrator has disabled public write access.
Go to top
What are you looking for?
Anti-spam question: How many eyes has a typical person?