*

mkallini

  • **
  • 13 posts
Car Type field empty in Car attribute plugin.
« on: March 12, 2026, 04:32:06 PM »
Hi,

Current version used:
  Osclass 8.3.1
  PHP 8.5
  Theme Epsilon 1.7.3
  Plugin Car attributes Osclass 3.3.2

The problem:
  [Car Type] dropdown field is empty, do not read data within select statement.

Debug log brings these PHP warnings:

  - Undefined array key 0 on line 73
 
  -  Trying to access array offset on null on line 78
 
  -  Undefined array key "" on line 78
 
  -  foreach() argument must be of type array/object, null given on line 78


Would appreciate any help.
mk

*

MB Themes

Re: Car Type field empty in Car attribute plugin.
« Reply #1 on: March 12, 2026, 06:10:47 PM »
Try to add some types, it should fix your issue
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

mkallini

  • **
  • 13 posts
Re: Car Type field empty in Car attribute plugin.
« Reply #2 on: March 12, 2026, 06:19:41 PM »
Thanks for your response, I already have 6 or 7 types in the database, should I add some more you think?
mk

*

mkallini

  • **
  • 13 posts
Re: Car Type field empty in Car attribute plugin.
« Reply #3 on: March 12, 2026, 07:08:02 PM »
added car type, unfortunately got the same results. the problem is in item_edit.php
mk

*

MB Themes

Re: Car Type field empty in Car attribute plugin.
« Reply #4 on: March 13, 2026, 03:49:52 PM »
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

mkallini

  • **
  • 13 posts
Re: Car Type field empty in Car attribute plugin.
« Reply #5 on: March 13, 2026, 10:12:57 PM »
Yes but unfortunately I am not using Ultimate Attributes PRO Plugin, I am using the free Osclass car attributes plugin which I don't have access to it's properties.
mk

*

MB Themes

Re: Car Type field empty in Car attribute plugin.
« Reply #6 on: March 17, 2026, 02:09:52 PM »
Ok I guess it does not exists in your locale.
You should work with this code
Code: [Select]
        <p>
          <label><?php _e('Car type', 'cars_attributes'); ?></label>
          <select name="car_type" id="car_type">
            <option value="" selected><?php _e('Select a car type', 'cars_attributes'); ?></option>
            <?php foreach($car_types[$locale['pk_c_code']] as $k => $v) { ?>
            <option value="<?php echo  $k; ?>" <?php if(@$detail['fk_vehicle_type_id'] == $k) { echo 'selected'; } ?>><?php echo @$v; ?></option>
            <?php } ?>
          </select>
        </p>
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots