This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

siken

  • ****
  • 136 posts
missing many phones to update your themes
« 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?
« Last Edit: September 25, 2019, 06:31:29 PM by alexandromt »

*

MB Themes

Re: mobile phone in an ad with alpha theme not seen in beta theme
« Reply #1 on: September 24, 2019, 08:48:57 AM »
@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.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

siken

  • ****
  • 136 posts
Re: mobile phone in an ad with alpha theme not seen in beta theme
« Reply #2 on: September 24, 2019, 09:33:13 AM »
The problem is that there are publications with Veronika, others with Alpha and others with Beta, how could I unify the three tables?

*

siken

  • ****
  • 136 posts
Re: mobile phone in an ad with alpha theme not seen in beta theme
« Reply #3 on: September 24, 2019, 10:51:22 AM »
@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.

*

MB Themes

Re: mobile phone in an ad with alpha theme not seen in beta theme
« Reply #4 on: September 24, 2019, 02:17:53 PM »
@alexandromt
No such plugin is on plan. You can do union query of all 3 tables and save it as new one.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

siken

  • ****
  • 136 posts
Re: mobile phone in an ad with alpha theme not seen in beta theme
« Reply #5 on: September 24, 2019, 03:21:47 PM »
@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.

Marked as best answer by leales_org on September 26, 2019, 04:49:33 PM
*

siken

  • ****
  • 136 posts
Re: missing many phones to update your themes
« Reply #6 on: September 26, 2019, 04:49:26 PM »
@alexandromt
Try this set of queries

Code: [Select]
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:


Code: [Select]
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