Supplier - Item Name - Price on Separate Rows in CatalogList

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
superscotty19
Posts: 95
Joined: 13 May 2019, 08:09

Supplier - Item Name - Price on Separate Rows in CatalogList

Post by superscotty19 » 27 Jun 2019, 01:54

Hi,

TYPO3 8.7
Aimeos 18.10

I need the catalog list to show list this:

<SUPPLIER>
<Label>
<Price>

But right now all I can get is:

<Label>

<Price>

I've tried creating a supplier but there's nowhere in the Product element to specify the supplier of the product, hence I had to put the Supplier name in the product label.

How do I apply a supplier name to the product, and then how do I get it to appear on separate rows in the catalogue list?

Thanks,
-Scott.

superscotty19
Posts: 95
Joined: 13 May 2019, 08:09

Re: Supplier - Item Name - Price on Separate Rows in Catalog

Post by superscotty19 » 27 Jun 2019, 01:56

Here's what my Aimeos looks like ....
Attachments
Screenshot_2019-06-26 Bikes.png
Screenshot_2019-06-26 Bikes.png (42.77 KiB) Viewed 3293 times

superscotty19
Posts: 95
Joined: 13 May 2019, 08:09

Re: Supplier - Item Name - Price on Separate Rows in Catalog

Post by superscotty19 » 27 Jun 2019, 01:57

... but here's what I need it to look like:
Attachments
Screenshot_2019-06-26-1 Bikes.png
Screenshot_2019-06-26-1 Bikes.png (42.73 KiB) Viewed 3293 times

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

Re: Supplier - Item Name - Price on Separate Rows in Catalog

Post by aimeos » 27 Jun 2019, 09:37

The whole supplier data isn't available in product list views. You can either create a new text type (vendor) or attributes with the vendor names. For attributes, you have to extend this configuration by "attribute": https://aimeos.org/docs/Configuration/C ... ts/domains

In both cases, you have to overwrite the catalog lists template in your Aimeos extension to display the information where you need it.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

superscotty19
Posts: 95
Joined: 13 May 2019, 08:09

Re: Supplier - Item Name - Price on Separate Rows in Catalog

Post by superscotty19 » 27 Jun 2019, 10:18

Hi,

I thought as much, and I have already created a "Brand" attribute. So, I'm half way there. As for the documentation and much like the template docs, I have no clue what that code is referring to. Is that TypoScript? PHP? What file/location? I'm so lost...

-S.

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

Re: Supplier - Item Name - Price on Separate Rows in Catalog

Post by aimeos » 27 Jun 2019, 10:23

It's all PHP. As you have a lot of fundamential questions, maybe a paid 1:1 session with the guys from the Aimeos company may help you more: https://aimeos.com/aimeos-gmbh/contact/
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

superscotty19
Posts: 95
Joined: 13 May 2019, 08:09

Re: Supplier - Item Name - Price on Separate Rows in Catalog

Post by superscotty19 » 27 Jun 2019, 10:40

I understand and agree ... if I was asking a difficult question. But in this case, why do I need paid support just to get a file mapping? IMHO, this is basic templating. I just need to find the file that generates the catalog listing and I can add the brand attribute to it. I've worked with dozens of other extensions - in addition to TYPO3 itself - and this isn't a problem.

Why is this so complicated????
-S.

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

Re: Supplier - Item Name - Price on Separate Rows in Catalog

Post by aimeos » 27 Jun 2019, 15:45

Seems like either I don't understand your question or you are trapped somewhere in your thoughts because it's easy going:

1.) Create your brand attributes and assign them to your products (done)
2.) Configure the fetched product data in the list view (you can use TypoScript for that):

Code: Select all

plugin.tx_aimeos.settings.client.html.catalog.lists.domains {
   0 = media
   1 = price
   2 = text
   3 = attribute
}
3.) Copy the template you need to adapt (./typo3conf/ext/aimeos/Resources/Private/Extensions/ai-client-html/client/html/templates/common/partials/products-standard.php) to your own TYPO3 Aimeos extension (if named aimeos_myext then ./typo3conf/ext/aimeos_myext/Resources/Private/Extensions/aimeos_myext/client/html/templates/common/partials/products-standard.php)
4.) Print the value of the brand attribute for each product here: https://github.com/aimeos/ai-client-htm ... d.php#L184

Code: Select all

<?php if( ( $attrItem = current( $productItem->getRefItems( 'attribute', 'brand', 'default' ) ) ) !== false ) : ?>
    <?= $enc->html( $attrItem->getName() ) ?>
<?php endif ?>
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

superscotty19
Posts: 95
Joined: 13 May 2019, 08:09

Re: Supplier - Item Name - Price on Separate Rows in Catalog

Post by superscotty19 » 27 Jun 2019, 22:45

YES!

OK now I see the confusion.

2.) When you said "list view" (I think) you were referring to the frontend view of Aimeos. In my world, List view is what you get when you click "List" in the backend of TYPO3.

3.) I was also completely unaware of the file and location. That helps tremendously, but now my question is about the extension.
a.) I see there are very detailed steps at https://aimeos.org/docs/Developers/Create_an_extension so that's great but once I make the extension, how do I tell TYPO3 to use that template?
b.) If all I'm doing is changing one little part of products-standard,php on a private installation, and assuming I've done the CSS/JS overrides that don't touch the base theme, couldn't I just changed the existing template? I'm hoping the answer is, "yes but it won't survive an upgrade", in which case all I need to do is backup my data.

4.) Thank you for that code - exactly what I'm looking to do! I'm doubly thankful/worried because there is *no way* I would've guessed those functions/values/parameters. Where is the reference documentation for all the functions/values/parameters?

Thanks!!!
-S.

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

Re: Supplier - Item Name - Price on Separate Rows in Catalog

Post by aimeos » 28 Jun 2019, 10:43

superscotty19 wrote: a.) I see there are very detailed steps at https://aimeos.org/docs/Developers/Create_an_extension so that's great but once I make the extension, how do I tell TYPO3 to use that template?
b.) If all I'm doing is changing one little part of products-standard,php on a private installation, and assuming I've done the CSS/JS overrides that don't touch the base theme, couldn't I just changed the existing template? I'm hoping the answer is, "yes but it won't survive an upgrade", in which case all I need to do is backup my data.
If you store the template under the same name at the same directory structure in your own Aimeos extension, it will be used instead of the original template automatically :-)

"yes but it won't survive an upgrade" is true and therefore you shouldn't touch the original files as all! Everything can be overwritten/extended in your own extension.
superscotty19 wrote: 4.) Thank you for that code - exactly what I'm looking to do! I'm doubly thankful/worried because there is *no way* I would've guessed those functions/values/parameters. Where is the reference documentation for all the functions/values/parameters?
The API documents the parameters (https://aimeos.org/api/latest/) and having a look at the existing templates and what they do helps much.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply