Page 1 of 2

no Company output in the checkout-summary

Posted: 16 Dec 2017, 12:51
by mantik
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?

Re: no Company output in the checkout-summary

Posted: 16 Dec 2017, 14:53
by aimeos
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.

Re: no Company output in the checkout-summary

Posted: 18 Dec 2017, 08:05
by mantik
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.

Re: no Company output in the checkout-summary

Posted: 18 Dec 2017, 09:28
by mantik
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

Re: no Company output in the checkout-summary

Posted: 18 Dec 2017, 21:52
by aimeos
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

Re: no Company output in the checkout-summary

Posted: 19 Dec 2017, 06:18
by mantik
all constants are setted to my extension template so i setted it there. and i cehcked the html source just this aimeos.js from my ext is there

Re: no Company output in the checkout-summary

Posted: 19 Dec 2017, 06:25
by mantik
...there must be somewhere a php function where the company is cleared if someone don't choose company by the salutation...

Re: no Company output in the checkout-summary

Posted: 19 Dec 2017, 12:18
by aimeos
You are right, it's there: https://github.com/aimeos/ai-client-htm ... d.php#L456 and https://github.com/aimeos/ai-client-htm ... d.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.

Re: no Company output in the checkout-summary

Posted: 22 Dec 2017, 08:39
by mantik
how can i do that? same way like extend a manager?

Re: no Company output in the checkout-summary

Posted: 25 Dec 2017, 14:00
by aimeos
Yes, it works the same way in all parts of Aimeos: Extend from the Standard class, overwrite the method you want to change and configure the name of your new class: https://aimeos.org/docs/Configuration/C ... l#Checkout