diff --git a/CustomBoldCommentPlugin b/CustomBoldCommentPlugin new file mode 100644 index 0000000..4b1c8d4 --- /dev/null +++ b/CustomBoldCommentPlugin @@ -0,0 +1,41 @@ +extensionFactory = $extensionFactory; + } + + public function afterGet(OrderRepositoryInterface $subject, OrderInterface $order) + { + $customBoldComments = $order->getData(self::FIELD_NAME); + $extensionAttributes = $order->getExtensionAttributes(); + $extensionAttributes = $extensionAttributes ? $extensionAttributes : $this->extensionFactory->create(); + $extensionAttributes->setBoldOrderComment($customBoldComments); + $order->setExtensionAttributes($extensionAttributes); + return $order; + } + + public function afterGetList(OrderRepositoryInterface $subject, OrderSearchResultInterface $searchResult) + { + $orders = $searchResult->getItems(); + foreach ($orders as &$order) { + $customBoldComments = $order->getData(self::FIELD_NAME); + $extensionAttributes = $order->getExtensionAttributes(); + $extensionAttributes = $extensionAttributes ? $extensionAttributes : $this->extensionFactory->create(); + $extensionAttributes->setBoldOrderComment($customBoldComments); + $order->setExtensionAttributes($extensionAttributes); + } + return $searchResult; + } +} diff --git a/etc/di.xml b/etc/di.xml index cf06849..2542f03 100644 --- a/etc/di.xml +++ b/etc/di.xml @@ -15,4 +15,9 @@ - \ No newline at end of file + + + + + diff --git a/i18n/es_ES.csv b/i18n/es_ES.csv new file mode 100644 index 0000000..16ab730 --- /dev/null +++ b/i18n/es_ES.csv @@ -0,0 +1,5 @@ +"Do you have any comments regarding the order?","¿Tienes algún comentario para agregar al pedido?" +"Enter your comment...","Ingrese su comentario..." +"Order Comment","Comentario del pedido" +"The order comment could not be saved","El comentario del pedido no pudo ser almacenado" +"Cart %1 doesn't contain products","El carrito %1 no contiene productos"