L
L
Lasqez2017-03-11 02:43:59
WordPress
Lasqez, 2017-03-11 02:43:59

Website integration in wordpress. Maybe?

I will describe the situation. There is a main store database that stores data about products, customers, product categories. A simple php + mysql site was written that displayed all the necessary information. Because I needed more advanced functionality, I decided to switch to cms in order not to do everything from scratch for a long and painful time. I chose wordpress, all the functionality and the availability of plugins for all needs are present.
Actually a dilemma. The main base of the store on the server where the wp base will be located. The product is replenished every day or sold, there was an idea to synchronize / replicate the main database and the wp database, because. only 2 tables were required from the main database, with the product and categories. But, since this method remains unknown to me and, as for me, difficult to implement, method 2 was chosen. The second way is to display the information from the main base directly inside wp, that is, in its template.
What is needed for this? All operations are now performed on Denwere. I basically have 4 working files that will be needed.
Threw the connection file with the main database and others to the root:
cont.php file - displays the last 12 added products. Actually, I need the wp theme to be displayed when the site is opened and my 12 products to be displayed instead of the wp content. In the index.php file , I wrote include ("content.php"); .
File view.php - displays information about the product (price, product number, name), performed through the GET variable by product id. The link looks like site/view.php?id=1. But again, everything displayed is at the bottom of the page, and in wp it says that there is no page with such a url. In this file I used the wp key 'require('../wp-blog-header.php');' Well, actually the same question, how to make it so that the site/view.php?id=1 url displays info about the product in the content.
I apologize if the question was asked, I just don’t know how to formulate the question correctly, when searching in Google, it showed integration with other engines.
PS As I understand it, I should have the view.php file at the root and bind to this file in the wordpress template?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
WP Panda, 2017-03-11
@wppanda5

your path is method number 1 or even method 1.1, which is better, just import the database into the WP WC database; the
second method is very hemorrhoids, and a lot of things will have to be re/added

V
Vasya Petrov, 2017-03-11
@VasyaPertrov

Having given the steps:
1, Form csv or xml from the current database and import it into WC.
2. Throw out what was before (as far as I understand, it is no longer necessary, since all product management will be transferred to WC)
If necessary
3. Set up redirects

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question