google merchant center - export from aimeos

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3/Flow, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
prosatya
Posts: 8
Joined: 05 Feb 2020, 09:41

Re: google merchant center - export from aimeos

Post by prosatya » 09 Feb 2020, 14:44

Thank you for update code, Really helpful for me.

Still i want to understand and know relationship so i can have complete knowledge of the product before writing code.

If possible please provide
- Relationship detail Like PK FK CK etc...
- SQL Query so i can easily identify what i want from the table and customize according to idea.

User avatar
aimeos
Administrator
Posts: 3717
Joined: 01 Jan 1970, 00:00

Re: google merchant center - export from aimeos

Post by aimeos » 10 Feb 2020, 17:09

Don't mess around with the database tables too much as the Aimeos core abstracts the concrete storage away.

The only thing you should understand is that Aimeos is organized in data domains (product, catalog, service, attribute, text, etc.) and it doesn't have a fixed data structure. Instead, most data (texts/prices/media/attributes) are referenced via the *_list tables so you can add an unlimited number of those references to a product.

If you want to see the database details nevertheless, you should have a look at the definition in phpMyAdmin. Also, you can find the SQL queries used by Aimeos in the config directory: https://github.com/aimeos/aimeos-core/t ... nfig/mshop
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

prosatya
Posts: 8
Joined: 05 Feb 2020, 09:41

Re: google merchant center - export from aimeos

Post by prosatya » 12 Feb 2020, 09:04

Thank you so much for your quick support.

I review Below two file still not getting what i want (Product and Media Relationship)
https://github.com/aimeos/aimeos-core/b ... /media.php
https://github.com/aimeos/aimeos-core/b ... roduct.php

Here is Simple Example
Let's Suppose my product Id is : 57
1- SELECT * FROM mshop_product where id=57
2- SELECT * FROM mshop_index_text where prodid = 57
3- SELECT * FROM mshop_index_price where prodid = 57
4= SELECT * FROM ??? Media ??? where prodid = 57
What i'm trying to achieve by query
Product URL (shop/detail?ai[d_name]=mshop_product[label])- How i can get this ??
Image URL (URL of main image) - How i can get this ??

User avatar
aimeos
Administrator
Posts: 3717
Joined: 01 Jan 1970, 00:00

Re: google merchant center - export from aimeos

Post by aimeos » 13 Feb 2020, 08:45

Don't mess around with SQL queries. Aimeos offers you a powerful API to get all data you need.
Put that into the run() method of your export job controller (https://aimeos.org/docs/Developers/Cont ... controller):

Code: Select all

$context = $this->getContext();
$view = $context->getView();
$manager = \Aimeos\MShop::create( $context, 'product' );
$search = $manager->createSearch();
$view->items = $manager->searchItems( $search, ['attribute', 'media', 'price', 'text'] );
$output = $view->render( 'product/export/google-standard' );
and use this template as reference for your own in ./typo3conf/ext/<yourext>/Resources/Private/Extensions/<yourext>/controller/jobs/templates/product/export/google-standard.php (retrieve the items with $this->get( 'items', [] ) in the template):
https://github.com/aimeos/ai-controller ... andard.php
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

prosatya
Posts: 8
Joined: 05 Feb 2020, 09:41

Re: google merchant center - export from aimeos

Post by prosatya » 13 Feb 2020, 14:04

Again your response is the same as previous. I'm looking for DB Knowledge not building extension,

Now sure why you guys Standard answer " Don't mess around with SQL queries"

Let me know if this is possible what i'm looking.

Thank you.

Post Reply