no Company output in the checkout-summary

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!
mantik
Posts: 89
Joined: 23 Oct 2017, 05:56

no Company output in the checkout-summary

Post 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?

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

Re: no Company output in the checkout-summary

Post 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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

mantik
Posts: 89
Joined: 23 Oct 2017, 05:56

Re: no Company output in the checkout-summary

Post 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.

mantik
Posts: 89
Joined: 23 Oct 2017, 05:56

Re: no Company output in the checkout-summary

Post 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

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

Re: no Company output in the checkout-summary

Post 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
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

mantik
Posts: 89
Joined: 23 Oct 2017, 05:56

Re: no Company output in the checkout-summary

Post by mantik » 19 Dec 2017, 06:18

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

mantik
Posts: 89
Joined: 23 Oct 2017, 05:56

Re: no Company output in the checkout-summary

Post by mantik » 19 Dec 2017, 06:25

...there must be somewhere a php function where the company is cleared if someone don't choose company by the salutation...

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

Re: no Company output in the checkout-summary

Post by aimeos » 19 Dec 2017, 12:18

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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

mantik
Posts: 89
Joined: 23 Oct 2017, 05:56

Re: no Company output in the checkout-summary

Post by mantik » 22 Dec 2017, 08:39

how can i do that? same way like extend a manager?

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

Re: no Company output in the checkout-summary

Post by aimeos » 25 Dec 2017, 14:00

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
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply