*

DIY & Crafts

  • *
  • 1 posts
Attributes Osclass Plugin SQL Cars
« on: July 27, 2022, 10:35:42 PM »
Hello All i want help please
anyone have sql for
Attributes Osclass Plugin​
Car Make, model, years etc...

Not Car_Attributes 
 

*

mwindey

  • *****
  • 461 posts
Re: Attributes Osclass Plugin SQL Cars
« Reply #1 on: July 28, 2022, 11:29:24 AM »
This sql creates tables but you have to fill conditions yourself or do you want someone else to fill it for you?
Code: [Select]
CREATE TABLE /*TABLE_PREFIX*/t_item_car_vehicle_type_attr (
  pk_i_id INT(2) UNSIGNED NOT NULL,
  fk_c_locale_code CHAR(5) NOT NULL,
  s_name VARCHAR(255),

  PRIMARY KEY (pk_i_id, fk_c_locale_code),
  FOREIGN KEY (fk_c_locale_code) REFERENCES /*TABLE_PREFIX*/t_locale (pk_c_code) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARACTER SET 'UTF8' COLLATE 'UTF8_GENERAL_CI';

CREATE TABLE /*TABLE_PREFIX*/t_item_car_make_attr (
  pk_i_id INT(2) UNSIGNED NOT NULL AUTO_INCREMENT,
  s_name VARCHAR(255),

  PRIMARY KEY (pk_i_id)
) ENGINE=InnoDB DEFAULT CHARACTER SET 'UTF8' COLLATE 'UTF8_GENERAL_CI';

CREATE TABLE /*TABLE_PREFIX*/t_item_car_model_attr (
  pk_i_id INT(2) UNSIGNED NOT NULL AUTO_INCREMENT,
  fk_i_make_id INT(2) UNSIGNED NOT NULL,
  s_name VARCHAR(255),

  PRIMARY KEY (pk_i_id),
  FOREIGN KEY (fk_i_make_id) REFERENCES /*TABLE_PREFIX*/t_item_car_make_attr (pk_i_id) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARACTER SET 'UTF8' COLLATE 'UTF8_GENERAL_CI';

CREATE TABLE /*TABLE_PREFIX*/t_item_car_attr (
  fk_i_item_id INT(10) UNSIGNED NOT NULL,
  i_year INT(4) UNSIGNED,
  i_doors INT(1) UNSIGNED,
  i_seats INT(4) UNSIGNED,
  i_mileage INT(10) UNSIGNED,
  i_engine_size INT(10) UNSIGNED,
  fk_i_make_id INT(2) UNSIGNED,
  fk_i_model_id INT(2) UNSIGNED,
  i_num_airbags INT(2) UNSIGNED,
  e_transmission ENUM('MANUAL', 'AUTO'),
  e_fuel ENUM('DIESEL', 'GASOLINE', 'ELECTRIC-HIBRID', 'OTHER'),
  e_seller ENUM('DEALER', 'OWNER'),
  b_warranty BOOLEAN,
  b_new BOOLEAN,
  i_power INT(10) UNSIGNED,
  e_power_unit ENUM('KW', 'CV', 'CH', 'KM', 'HP', 'PS', 'PK', 'CP'),
  i_gears INT(1) UNSIGNED,
  fk_vehicle_type_id INT(10) UNSIGNED,

  INDEX (fk_i_item_id),
  PRIMARY KEY (fk_i_item_id),
  FOREIGN KEY (fk_i_item_id) REFERENCES /*TABLE_PREFIX*/t_item (pk_i_id) ON DELETE CASCADE ON UPDATE CASCADE,
  FOREIGN KEY (fk_i_make_id) REFERENCES /*TABLE_PREFIX*/t_item_car_make_attr (pk_i_id) ON DELETE CASCADE ON UPDATE CASCADE,
  FOREIGN KEY (fk_i_model_id) REFERENCES /*TABLE_PREFIX*/t_item_car_model_attr (pk_i_id) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARACTER SET 'UTF8' COLLATE 'UTF8_GENERAL_CI';

*

MB Themes

Re: Attributes Osclass Plugin SQL Cars
« Reply #2 on: August 01, 2022, 12:17:12 PM »
I would say I saw such file somewhere here in forums...
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

Re: Attributes Osclass Plugin SQL Cars
« Reply #3 on: June 01, 2023, 01:22:53 PM »
Good afternoon!I'm sorry if the question is not quite for you. And this is not a question of error. But it concerns the car_attributes plugin. Please tell me if it's not difficult. If I want to add a couple more criteria to the filter to search for ads. I create corresponding windows and functions for this. How to make the search carried out taking into account the data of these windows? In which function do I need to add the criteria I have added? Thank you in advance for your help.

*

MB Themes

Re: Attributes Osclass Plugin SQL Cars
« Reply #4 on: June 01, 2023, 03:17:32 PM »
you must add those fields to form first and then manage them when form is submitted to add proper filters in database layer.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

Re: Attributes Osclass Plugin SQL Cars
« Reply #5 on: June 02, 2023, 07:09:56 PM »
Thank you for your promptness. I created the forms themselves. I also wrote functions for them. I just can't figure out which function processes the forms and sends the data to the database?

*

MB Themes

Re: Attributes Osclass Plugin SQL Cars
« Reply #6 on: June 05, 2023, 10:26:49 AM »
These functions are hooked via "posted_item" or "edited_item" hooks.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots