How to configure and adapt Aimeos based shops as developer
Forum rules: Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#1772 by Bananamoon
19 Aug 2015, 09:57
Hi! :-) (sorry for spamming this forum!)

I'm trying to overwrite the default breadcrumb, but am not sure how to do this.
I know how to create a new component, and was just wondering if this goes the same way for a subcomponent?

So from a default subcomponent it becomes a component that you have to add in the shop config file in order to show it on a page, or am I wrong in this?

Thanks again for your help! :-)
#1773 by aimeos
19 Aug 2015, 10:39
Bananamoon wrote:I'm trying to overwrite the default breadcrumb, but am not sure how to do this.
I know how to create a new component, and was just wondering if this goes the same way for a subcomponent?

So from a default subcomponent it becomes a component that you have to add in the shop config file in order to show it on a page, or am I wrong in this?


Every question is welcome! :-)

You can create a new breadcrumb template if you want to change the layout: https://aimeos.org/docs/Developers/Html ... _templates
If you need more information in your template and want to overwrite the breadcrumb component, you can extends the existing implementation and overwrite the _setViewParams() method:
https://aimeos.org/docs/Developers/Html ... rams.28.29

Does this answer your question?
#1774 by Bananamoon
19 Aug 2015, 11:05
aimeos wrote:
Bananamoon wrote:I'm trying to overwrite the default breadcrumb, but am not sure how to do this.
I know how to create a new component, and was just wondering if this goes the same way for a subcomponent?

So from a default subcomponent it becomes a component that you have to add in the shop config file in order to show it on a page, or am I wrong in this?


Every question is welcome! :-)

You can create a new breadcrumb template if you want to change the layout: https://aimeos.org/docs/Developers/Html ... _templates
If you need more information in your template and want to overwrite the breadcrumb component, you can extends the existing implementation and overwrite the _setViewParams() method:
https://aimeos.org/docs/Developers/Html ... rams.28.29

Does this answer your question?


Thanks for the info! Altho I'm still not sure how to implement the template.
I copied the
Code: Select allClient/Html/Catalog/Stage/Breadcrumb/Default.php
to
Code: Select allext/ai-project/client/html/src/Client/Html/Catalog/Mystage/Default.php
I extended like this:

Code: Select allclass Client_Html_Catalog_Optistage_Default
   extends Client_Html_Catalog_Stage_Default

I'm not sure if this is the correct way, since it doesn't seem to use this file so far. Am I missing something?
Thanks again for your help :-)

On side node, could you also check my other question please? https://aimeos.org/help/laravel-package-f18/modify-the-basket-mini-layout-t468.html :oops: Thank you!
#1775 by Luke
19 Aug 2015, 12:38
Hi,

I am also having a similar issue, did you manage to fix it or is there someone on the board who could help ?
#1777 by aimeos
19 Aug 2015, 14:10
Bananamoon wrote:Thanks for the info! Altho I'm still not sure how to implement the template.
I copied the
Code: Select allClient/Html/Catalog/Stage/Breadcrumb/Default.php
to
Code: Select allext/ai-project/client/html/src/Client/Html/Catalog/Mystage/Default.php
I extended like this:

Code: Select allclass Client_Html_Catalog_Optistage_Default
   extends Client_Html_Catalog_Stage_Default

I'm not sure if this is the correct way, since it doesn't seem to use this file so far. Am I missing something?


It's much easier, if you only want to change the template. You don't need to create a new component (Optistage) but only configure a new template for the breadcrumb body of the existing catalog stage breadcrumb: https://aimeos.org/docs/Configuration/Core/client/html/catalog/stage/breadcrumb/default/template-body

Place it in your Aimeos extension and it will be used after you cleared the content cache (if you didn't disable content caching by default in your dev environment).
#1780 by Bananamoon
19 Aug 2015, 14:26
aimeos wrote:
Bananamoon wrote:Thanks for the info! Altho I'm still not sure how to implement the template.
I copied the
Code: Select allClient/Html/Catalog/Stage/Breadcrumb/Default.php
to
Code: Select allext/ai-project/client/html/src/Client/Html/Catalog/Mystage/Default.php
I extended like this:

Code: Select allclass Client_Html_Catalog_Optistage_Default
   extends Client_Html_Catalog_Stage_Default

I'm not sure if this is the correct way, since it doesn't seem to use this file so far. Am I missing something?


It's much easier, if you only want to change the template. You don't need to create a new component (Optistage) but only configure a new template for the breadcrumb body of the existing catalog stage breadcrumb: https://aimeos.org/docs/Configuration/Core/client/html/catalog/stage/breadcrumb/default/template-body

Place it in your Aimeos extension and it will be used after you cleared the content cache (if you didn't disable content caching by default in your dev environment).


Yay! It all works! :-) Thank you so much for your help!
#1781 by Luke
19 Aug 2015, 14:38
Hi,

I am having a similar issue, I am wanting to override the item details default.php
path = ext/ai-rotex/client/html/src/Client/Html/Catalog/Detail

I want to remove the social from the subpaths but it's not working any ideas what I am doing wrong.
my new class =
Code: Select allclass Client_Html_Catalog_RotexDetail_Default
   extends Client_Html_Catalog_Detail_Default
#1782 by aimeos
19 Aug 2015, 15:00
Luke wrote:Hi,

I am having a similar issue, I am wanting to override the item details default.php
path = ext/ai-rotex/client/html/src/Client/Html/Catalog/Detail

I want to remove the social from the subpaths but it's not working any ideas what I am doing wrong.


Very simple: Only configure the https://aimeos.org/docs/Configuration/Core/client/html/catalog/detail/default/subparts setting and leave out the "social" string.
#1783 by Luke
19 Aug 2015, 15:43
Hey,

That is exactly what I have done but it doesn't seem to be working, what could my new class name be ? it cannot be the same name as the one I am extending can it.