Looking for a Wordpress/PHP dev for a quick help

RiseAgainst

Member
Oct 7, 2018
88
18
8
Looking for a Wordpress/PHP developer to help me make a few changes to my current code to combine stocks from different XML feeds.

The help is regarding Woocomerce and WP All Import plugin.

Thanks.
 

RiseAgainst

Member
Oct 7, 2018
88
18
8
@RiseAgainst, give more details, I'll see if I can help, been quite busy recently.

What I'm trying to do is combine 2 stock quantities from 2 different xml feeds (1st is supplier stock and 2nd is a local store stock)

I used the code someone else shared who was trying to do the same thing. It works fine but only the first time the import is run, the second time the values are skipped and not updated.

I think it should be an easy fix but I just can't figure it out by myself :)
 
  • Like
Reactions: X--MEN

asdriel

Member
Apr 26, 2019
198
17
18
www.bantu-2rsn.com
Hello!! I would like to know if you have any idea how to use 2 wordpress sites with the same database and allow communication between them, ie allow the clients of one site to have access to the other, that is if a client creates the account in one of the sites , is automatically registered on the other site as well. I thought about doing it with the duplicator, but I'll have problems there when I have more clients, in that case I'll have to be duplicating the database every time, and it will not be efficient, what I do is know how to do it. registering on one site goes to the other as well. Thank you
 

marcost96

Active member
Babiato Lover
Oct 22, 2018
188
155
43
Argentina
grupo-met.com
Hello!! I would like to know if you have any idea how to use 2 wordpress sites with the same database and allow communication between them, ie allow the clients of one site to have access to the other, that is if a client creates the account in one of the sites , is automatically registered on the other site as well. I thought about doing it with the duplicator, but I'll have problems there when I have more clients, in that case I'll have to be duplicating the database every time, and it will not be efficient, what I do is know how to do it. registering on one site goes to the other as well. Thank you

The solution below did the job for me,

Install 2 WordPress sites on a single database.

Create new table in your database. Call it wp_options2 and copy everything from wp_options into this new table

In second install go to wp-config.php, and before if (!defined('ABSPATH')) add define( 'M7_OPTIONS_TABLE', 'wp_options2');

In second install go to wp-includes/wp-db.php on line 1009 and add code:

Code:
if (isset( $tables['options'] ) && defined('M7_OPTIONS_TABLE')) $tables['options'] = M7_OPTIONS_TABLE;

These codes should be added in public function tables function, before if (isset( $tables['users']) && defined('CUSTOM_USER_TABLE')))

I found this solution here, https://wordpress.stackexchange.com...mes-and-with-single-database-an#answer-175494

Since we use the same database, links will be same on both the sites. I had a lot of images linked and I removed them using

Code:
.single a[href$=".jpg"] {
    pointer-events: none;
    cursor: default; 
}
 

SharkTanker

Tech Guru
Trusted Uploader
Oct 30, 2018
386
648
93
corporatehitech.com.au
Hello!! I would like to know if you have any idea how to use 2 wordpress sites with the same database and allow communication between them, ie allow the clients of one site to have access to the other, that is if a client creates the account in one of the sites , is automatically registered on the other site as well. I thought about doing it with the duplicator, but I'll have problems there when I have more clients, in that case I'll have to be duplicating the database every time, and it will not be efficient, what I do is know how to do it. registering on one site goes to the other as well. Thank you
What you should have done is open a new thread... NOT reply inside someone else's thread in regards to a different conversation entirely...
 
  • Like
Reactions: marcost96

SharkTanker

Tech Guru
Trusted Uploader
Oct 30, 2018
386
648
93
corporatehitech.com.au
The solution below did the job for me,

Install 2 WordPress sites on a single database.

Create new table in your database. Call it wp_options2 and copy everything from wp_options into this new table

In second install go to wp-config.php, and before if (!defined('ABSPATH')) add define( 'M7_OPTIONS_TABLE', 'wp_options2');

In second install go to wp-includes/wp-db.php on line 1009 and add code:

Code:
if (isset( $tables['options'] ) && defined('M7_OPTIONS_TABLE')) $tables['options'] = M7_OPTIONS_TABLE;

These codes should be added in public function tables function, before if (isset( $tables['users']) && defined('CUSTOM_USER_TABLE')))

I found this solution here, https://wordpress.stackexchange.com...mes-and-with-single-database-an#answer-175494

Since we use the same database, links will be same on both the sites. I had a lot of images linked and I removed them using

Code:
.single a[href$=".jpg"] {
    pointer-events: none;
    cursor: default;
}
Thanks for your efforts.
 

RiseAgainst

Member
Oct 7, 2018
88
18
8
wh

okay what kind of help you need more details
Do you have experience with WP All Import pro? or Wordpress development? I need to modify my code to automatically update products that are not matched by the import and set their stock quantity to 0.
 

marcost96

Active member
Babiato Lover
Oct 22, 2018
188
155
43
Argentina
grupo-met.com
Do you have experience with WP All Import pro? or Wordpress development? I need to modify my code to automatically update products that are not matched by the import and set their stock quantity to 0.
Hi! To import woocommerce products, you can easily do it with the tool that Wordpress offers, and to establish the stock of all the products in 0 you can do it through a line of SQL.
 

RiseAgainst

Member
Oct 7, 2018
88
18
8
Hey, I'm trying to set up multiple automated recurring imports using WP All Import not just a single import so wordpress tool won't work.
 

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu