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)
#5238 by mantik
16 Dec 2017, 12:51
Hello i don't have any comany when i go to the checkout summary.
but in the billing / deliveryaddress-view it appears

typo3conf/ext/aimeos/Resources/Private/Extensions/ai-client-html/client/html/templates/common/summary/address-default.php
Code: Select all   $this->translate( 'client', '%1$s
%2$s %3$s %4$s %5$s
%6$s %7$s
%8$s
%9$s %10$s
%11$s
%12$s
%13$s
%14$s
%15$s
%16$s
%17$s
%18$s
'
   ),
   $addr->getCompany(),
   ( in_array( $addr->getSalutation(), $salutations ) ? $this->translate( 'client/code', $addr->getSalutation() ) : '' ),
   $addr->getTitle(),
   $addr->getFirstName(),
   $addr->getLastName(),
   $addr->getAddress1(),
   $addr->getAddress2(),
   $addr->getAddress3(),
   $addr->getPostal(),
   $addr->getCity(),
   $addr->getState(),
   $this->translate( 'client/country', $addr->getCountryId() ),
   $this->translate( 'client/language', $addr->getLanguageId() ),
   $addr->getEmail(),
   $addr->getTelephone(),
   $addr->getTelefax(),
   $addr->getWebsite(),
   $addr->getVatID()

Strange is also when i go to the last summary and then back to the address view my company is lost!
and i have to set it new in the users backend....

is there any kind of posting/updating in the checkout before i order?
#5241 by aimeos
16 Dec 2017, 14:53
In the demo it seems to work without problem: http://typo3.demo.aimeos.org/demo/
Maybe you've overwritten someting in your own templates resp. use a wrong field name etc.?

The addresses in the checkout process are updated in the database after the address step if they are changed.
#5243 by mantik
18 Dec 2017, 08:05
ok i got it. if i choose by the gender company it works. but if i use mr then the company field would be cleared.
i wanna first remove company from gender and second i would use both because we need a person in the company to deliver the order.
#5246 by mantik
18 Dec 2017, 09:28
ok i find how to configure
Code: Select all            checkout{
                standard{
                    address{
                        billing{
                            salutations{
                                1 = mr
                                2 = mrs
                            }


So now i need just to deactivate the salutation-company-mechanism.
i disable it in aimeos.js

Code: Select all   /**
    * Shows company and VAT ID fields if salutation is "company", otherwise
    * hide the fields
    */
   /*
   setupSalutationCompany: function() {

      $(".checkout-standard-address .form-list").on("change", ".salutation select", function(ev) {
         var fields = $(".company,.vatid", ev.delegateTarget);
         $(this).val() === "company" ? fields.show() : fields.hide();
      });
   },
*/




...on different positions (setupAddressForms, setupSalutationCompany) but dosent work
#5252 by aimeos
18 Dec 2017, 21:52
In with aimeos.js did you deactivated it? The one in the ai-client-html extension isn't used because there's a copy in Resource/Public/ required by TYPO3
#5261 by aimeos
19 Dec 2017, 12:18
You are right, it's there: https://github.com/aimeos/ai-client-html/blob/master/client/html/src/Client/Html/Checkout/Standard/Address/Billing/Standard.php#L456 and https://github.com/aimeos/ai-client-html/blob/master/client/html/src/Client/Html/Checkout/Standard/Address/Delivery/Standard.php#L410

I think we should remove that lines so it will be possible to use company/VATID easier in combination with another saluation. For the time now, you would have to extend those two classes, overwrite that method and configure the name of your new class.