Support Forums - Classified Ads Script Osclass
Osclass theme support => Beta Osclass Theme => Topic started by: siken on September 24, 2019, 01:43:48 AM
-
Why is a mobile phone added in an ad with alpha theme not seen in beta theme?
-
@alexandromt
Because each theme use own table to store information that cannot be stored in osclass itself. Go to your database, drop t_item_beta and rename t_item_alpha to t_item_beta.
-
The problem is that there are publications with Veronika, others with Alpha and others with Beta, how could I unify the three tables?
-
@alexandromt
Because each theme use own table to store information that cannot be stored in osclass itself. Go to your database, drop t_item_beta and rename t_item_alpha to t_item_beta.
I need to make a query that combines the veronika table data in alpha, and then the alpha table data in beta. And that way to have veronika and alpha data in the Beta table.
The problem is that having publications created with veronika, with alpha and with beta, publications older than 2 months do not have your telephone number or status labels.
You have to do some plugin that combines the data, or at least notify or give those instructions. If we do not show the phones or the current status of each publication, the database is of no use.
-
@alexandromt
No such plugin is on plan. You can do union query of all 3 tables and save it as new one.
-
@alexandromt
No such plugin is on plan. You can do union query of all 3 tables and save it as new one.
Can you tell me the query to enter it in phpmyadmin ?.
The idea is to combine the data from the "oc_t_item_veronika" table with the "oc_t_item_alpha" table and with the "oc_t_item_beta table".
I await the consultation, thanks.
-
@alexandromt
Try this set of queries
REPLACE INTO oc_t_item_beta (fk_i_item_id, s_phone, i_condition, i_transaction)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction FROM oc_t_item_beta where s_phone <> '';
REPLACE INTO oc_t_item_beta (fk_i_item_id, s_phone, i_condition, i_transaction)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction FROM oc_t_item_alpha where s_phone <> '';
REPLACE INTO oc_t_item_beta (fk_i_item_id, s_phone, i_condition, i_transaction)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction FROM oc_t_item_veronika where s_phone <> '';
First I have put the web in maintenance mode.
Then I changed the table name oc_t_item_beta to oc_t_item_beta2
Then I have been adding these sequences in the database:
REPLACE INTO oc_t_item_beta_2 (fk_i_item_id, s_phone, i_condition, i_transaction, i_sold)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction, i_sold FROM oc_t_item_beta_leales where s_phone <> '';
REPLACE INTO oc_t_item_beta_2 (fk_i_item_id, s_phone, i_condition, i_transaction, i_sold)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction, i_sold FROM oc_t_item_beta_leales where i_condition <> '';
REPLACE INTO oc_t_item_beta_2 (fk_i_item_id, s_phone, i_condition, i_transaction, i_sold)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction, i_sold FROM oc_t_item_beta_leales where i_transaction <> '';
REPLACE INTO oc_t_item_beta_2 (fk_i_item_id, s_phone, i_condition, i_transaction, i_sold)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction, i_sold FROM oc_t_item_beta_leales where i_sold <> '';
REPLACE INTO oc_t_item_beta_2 (fk_i_item_id, s_phone, i_condition, i_transaction, i_sold)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction, i_sold FROM oc_t_item_veronika where s_phone <> '';
REPLACE INTO oc_t_item_beta_2 (fk_i_item_id, s_phone, i_condition, i_transaction, i_sold)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction, i_sold FROM oc_t_item_veronika where i_condition <> '';
REPLACE INTO oc_t_item_beta_2 (fk_i_item_id, s_phone, i_condition, i_transaction, i_sold)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction, i_sold FROM oc_t_item_veronika where i_transaction <> '';
REPLACE INTO oc_t_item_beta_2 (fk_i_item_id, s_phone, i_condition, i_transaction, i_sold)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction, i_sold FROM oc_t_item_veronika where i_sold <> '';
REPLACE INTO oc_t_item_beta_2 (fk_i_item_id, s_phone, i_condition, i_transaction, i_sold)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction, i_sold FROM oc_t_item_alpha where s_phone <> '';
REPLACE INTO oc_t_item_beta_2 (fk_i_item_id, s_phone, i_condition, i_transaction, i_sold)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction, i_sold FROM oc_t_item_alpha where i_condition <> '';
REPLACE INTO oc_t_item_beta_2 (fk_i_item_id, s_phone, i_condition, i_transaction, i_sold)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction, i_sold FROM oc_t_item_alpha where i_transaction <> '';
REPLACE INTO oc_t_item_beta_2 (fk_i_item_id, s_phone, i_condition, i_transaction, i_sold)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction, i_sold FROM oc_t_item_alpha where i_sold <> '';
I added the i_sold field to the query ...
And finally I renamed the table, from oc_t_item_beta_2 to oc_t_item_beta
And now old ads created with veronika or alpha have their phones with the new beta theme.
When changing the theme, you have to copy the data from the table of the previous theme, so the phones and the states of the ads will be.
Regards