aimeos / ai-admin-jqadm

Aimeos e-commerce Vue.js+Bootstrap based admin interface
https://aimeos.org
GNU Lesser General Public License v3.0
184 stars 43 forks source link

Order Service Attribute #168

Closed exemplari closed 3 years ago

exemplari commented 3 years ago

Environment "aimeos/aimeos-laravel": "~2020.10"

Describe the bug order.base.service.attribute not saving

To Reproduce Steps to reproduce the behavior:

  1. got to an order /admin/jqadm/get/order/9?lang=en
  2. Add an attribute to the delivery service
  3. Save

Expected behavior The attribute should be attached to the delivery. Like trackingid.

Screenshots Capture1

Additional context How i solved this. There seemed to be multiple problems customer controller . Aimeos\Admin\JQAdm\Order\Mycontroller Aimeos\Admin\JQAdm\Order\Standard Line 452 - this basket list is not indexed by serviceid foreach( $services as $serviceId => $service ) { $list = []; $attrItems = $service->getAttributeItems();

            if( isset( $data['service'][$type][$serviceId] ) )

foreach( $services as $idx => $service ) { $serviceId = $service->getServiceId(); $list = []; $attrItems = $service->getAttributeItems();

            if( isset( $data['service'][$type][$serviceId] ) )

Line 476 - patched in the name as required, possibly frontend issue +$array['order.base.service.attribute.name'] = $array['order.base.service.attribute.code'];

Line 478 - this was erroring $attrItem->fromArray( $array, true );

$attrItem->fromArray( $array, false );

aimeos commented 3 years ago

Thank you for your bug report. Can you create a PR fixing the issue?

exemplari commented 3 years ago

Just went over your docs for submitting PR. I will setup the environment to use in the future but it will be a few days before so whomever gets the fix first is fine.

aimeos commented 3 years ago

Fixed by https://github.com/aimeos/ai-admin-jqadm/commit/63526c83b16c5500adb86512adfa1ed2fcb4e19d