Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Supplier.php #245

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

switch-cheehau
Copy link

@switch-cheehau switch-cheehau commented Jul 21, 2021

Refer to #242

@switch-cheehau
Copy link
Author

switch-cheehau commented Jul 21, 2021

Hi Aimeos,

I tried the method suggested. let me know if any issue.

The concern is it's difficult for user to configure at frontend
image

This section seems redundant. should i delete it?

$this->feConfig['supplier.code']['short'][$addrId] = trim( preg_replace( "/\n+/m", "\n", sprintf(
/// Supplier address format with label (%1$s), company (%2$s),
/// address part one (%3$s, e.g street), address part two (%4$s, e.g house number), address part three (%5$s, e.g additional information),
/// postal/zip code (%6$s), city (%7$s), state (%8$s), country ID (%9$s),
/// e-mail (%10$s), phone (%11$s), facsimile/telefax (%12$s), web site (%13$s)
$context->getI18n()->dt( 'mshop', '%1$s, %2$s, %3$s %4$s, %6$s %7$s' ),
$item->getLabel(),
$addr->getCompany(),
$addr->getAddress1(),
$addr->getAddress2(),
$addr->getAddress3(),
$addr->getPostal(),
$addr->getCity(),
$addr->getState(),
$addr->getCountryId(),
$addr->getEmail(),
$addr->getTelephone(),
$addr->getTelefax(),
$addr->getWebsite()
) ) );

@coveralls
Copy link

coveralls commented Jul 21, 2021

Coverage Status

Coverage decreased (-2.3%) to 86.268% when pulling e9e049d on cgcomputers:make-supplier-address-format-configurable into 999f907 on aimeos:master.

@switch-cheehau switch-cheehau marked this pull request as ready for review July 21, 2021 06:56
@aimeos
Copy link
Owner

aimeos commented Jul 21, 2021

Yes, it's more difficult to configure but supports every format users want to use. Make sure you add the explaination of the placeholders to the label in $beConfig. The block you've mentioned can be removed.

@switch-cheehau
Copy link
Author

Yes, it's more difficult to configure but supports every format users want to use. Make sure you add the explaination of the placeholders to the label in $beConfig. The block you've mentioned can be removed.

Okay, will do that, at least in future, hopefully backend able to support textarea input

@aimeos
Copy link
Owner

aimeos commented Jul 21, 2021

@switch-cheehau
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants