Questions around the TYPO3 integration and plugins as well as Flow and NeosCMS
Forum rules: Always add your TYPO3/Flow, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#1884 by trimble
13 Sep 2015, 21:08
Hi,
I'm using TYPO3 7.4.

I'm struggling with the mini basket to insert it into the bootstrap_package navigation.

I've read "https://aimeos.org/docs/TYPO3/Add_basket_to_navigation" and tried it in a very simple way. I put

lib.navigation.basket = COA
lib.navigation.basket.10 = USER
lib.navigation.basket.10 {
userFunc = tx_extbase_core_bootstrap->run
# userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
# vendorName = Aimeos
extensionName = Aimeos
pluginName = basket-small
controller = Basket
action = small
settings =< plugin.tx_aimeos.settings
}

into to the root setup of my website and added

plugin.tx_aimeos.settings.client.html.basket.standard.url.target = <16>

the page ID of my basket page. Then added

<f:if condition="{f:cObject(typoscriptObjectPath:'lib.navigation.basket')}">
<f:cObject typoscriptObjectPath="lib.navigation.basket" />
</f:if>

into the Private/Partials/Page/Navigation/Main.html template. But there's no basket in the navigation. Adding other TS Objects instead of lib.navigation.basket works fine.

Thanks for any help.

Trimble
#1885 by aimeos
13 Sep 2015, 21:30
trimble wrote: I'm using TYPO3 7.4.

Code: Select alllib.navigation.basket.10 {
    userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
    vendorName = Aimeos


Please use the two lines above instead.
#1886 by trimble
14 Sep 2015, 09:03
aimeos wrote:
trimble wrote: I'm using TYPO3 7.4.

Code: Select alllib.navigation.basket.10 {
    userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
    vendorName = Aimeos


Please use the two lines above instead.


Thanks for the quick answer. Now I see 2 (!) baskets.

<div class="body-bg body-bg-top">
<a class="sr-only sr-only-focusable" href="#content">
Skip to main content
</a>
<header
class="navbar navbar-default navbar-has-image navbar-top navbar-fixed-top">
<div class="container">

<section class="aimeos basket-mini">
<h1>Warenkorb</h1>
<a href="">
<div class="basket-mini-main">
<span class="quantity">0 Artikel</span>
<span class="value">0.00 €</span>
</div>

</a>
</section>

<div class="navbar-header navbar-header-main">

<a class="navbar-brand navbar-brand-image" href="/home.html">
<img src="/fileadmin/_processed_/csm_logo_ce268eadd3.gif" alt="Logo: XXXXXXXXXXX" height="114" width="126">
</a>


<button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>

<span class="navbar-header-border-bottom"></span>

<div class="basket"><section class="aimeos basket-mini">
<h1>Warenkorb</h1>
<a href="">
<div class="basket-mini-main">
<span class="quantity">0 Artikel</span>
<span class="value">0.00 €</span>
</div>

</a>
</section></div>


This is the main template:

class="navbar navbar-{themeNavigationstyle}{f:if(condition:logoFile,then:' navbar-has-image')}{f:if(condition:themeNavigationtype, else:' navbar-top', then:' navbar-{themeNavigationtype} navbar-fixed-{themeNavigationtype}')}">
<div class="container">
<f:if condition="{f:cObject(typoscriptObjectPath:'lib.navigation.basket')}">
<f:cObject typoscriptObjectPath="lib.navigation.basket" />
</f:if>
<div class="navbar-header navbar-header-main">
<f:if condition="{logoFile}">
<f:then>
<f:link.page pageUid="{rootPage}" class="navbar-brand navbar-brand-image">
<img src="{f:uri.image(src: logoFile)}" alt="{logoAlt}" height="{logoHeight}" width="{logoWidth}">
</f:link.page>
</f:then>
<f:else>
<f:link.page pageUid="{rootPage}" class="navbar-brand">{siteTitle}</f:link.page>
</f:else>
</f:if>
<f:if condition="{f:cObject(typoscriptObjectPath:'lib.navigation.main')}">
<button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</f:if>
<span class="navbar-header-border-bottom"></span>
<f:if condition="{f:cObject(typoscriptObjectPath:'lib.navigation.basket')}">
<div class="basket"><f:cObject typoscriptObjectPath="lib.navigation.basket" /></div>
</f:if>
</div>
<nav class="navbar-collapse collapse" role="navigation">
<f:cObject typoscriptObjectPath="lib.navigation.main"/>
</nav>
</div>
</header>

And this is the lib.navigation.basket in the root setup

lib.navigation.basket = COA
lib.navigation.basket.10 = USER
lib.navigation.basket.10 {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
vendorName = Aimeos
extensionName = Aimeos
pluginName = basket-small
controller = Basket
action = small
settings =< plugin.tx_aimeos.settings
}
plugin.tx_aimeos.settings.client.html.basket.standard.url.target = <16>

One more question: The standard basket isn't found. Is it correct to write uid with brackets?

Thanks for youe help
Trimble
#1888 by aimeos
14 Sep 2015, 11:01
trimble wrote:Thanks for the quick answer. Now I see 2 (!) baskets.
This is the main template:

Code: Select all    <div class="container">
      <f:if condition="{f:cObject(typoscriptObjectPath:'lib.navigation.basket')}">
         <f:cObject typoscriptObjectPath="lib.navigation.basket" />
      </f:if>
...
            <span class="navbar-header-border-bottom"></span>
         <f:if condition="{f:cObject(typoscriptObjectPath:'lib.navigation.basket')}">
            <div class="basket"><f:cObject typoscriptObjectPath="lib.navigation.basket" /></div>
         </f:if>
        </div>
        <nav class="navbar-collapse collapse" role="navigation">
            <f:cObject typoscriptObjectPath="lib.navigation.main"/>
        </nav>
    </div>
</header>



Well, you've added it twice in your TypoScript ;-)

trimble wrote:One more question: The standard basket isn't found. Is it correct to write uid with brackets?
Code: Select allplugin.tx_aimeos.settings.client.html.basket.standard.url.target = <16>


No, the ID must be 16, not <16>.