Hi there. I have an E-Commerce project and I need help combining 4 mysql tables into a function that outputs all the products (we actually already have a function made, but it's not fully working).
I'm attaching an example of the API function's output which we are trying to re-create (and base this function on) - basically, we import the product data, so we can list the products from our local mysql database which is way faster than pulling the products from the API.
The API example in my screenshot has lots more data than we actually need for the local version, so in the attached screenshot - just look at the "variations" part of it - that's what I need to add - and like I said I already have a function that works, but it's missing that part. I can give you access to it (VPS, PHP, MySQL).
Variations: Large - $4.50 | Medium - $3.50 | Small - $2.50
Modifier Lists: Milk/Cream, Flavor, Sweetener
Milk/Cream: 2%, Whole, Skim, Coconut Milk
Flavor: Vanilla, Hazelnut, Mocha
Sweetener: Sugar, Coconut Sugar, Sweetener
That structure makes up a product. Right now the Modifiers and Variations aren't outputting, but I'm more concerned with fixing the Variations first - then we can fix the Modifiers after.
Also there is either a location_id or item_id in every table and that's how you can bind/link all the different parts of the products.
So first you could do select * from products where location = $any_location_id
Then that would return all our products and then I think we also have the location in the variations table too plus we can link them on the item_id (note: we have lots of locations in the table so using the location id keeps the query result limited to only the products for one location/shop).
I can't remember what modifiers has but it's very easy to see what binds each table once you look at the table.
53 фрилансеров(-а) готовы выполнить эту работу в среднем за $13/час
I've gone through your project details and understood it. I am available to start work immediately and I'll provide full satisfaction and best price. I hope to work with you. Thanks for reading me.