Skip to content

Commit c40f2ff

Browse files
ENGCOM-2793: [Forwardport] 6305 - Resolved product custom option title save issue #17607
- Merge Pull Request #17607 from jignesh-baldha/magento2:2.3-develop-PR-port-15357 - Merged commits: 1. d60b3cf 2. 71ce3fa 3. 170d029 4. 6aebfe8
2 parents 05f9df7 + 6aebfe8 commit c40f2ff

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

app/code/Magento/Catalog/Model/Product/Option/Validator/DefaultValidator.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ protected function isValidOptionTitle($title, $storeId)
106106
if ($storeId > \Magento\Store\Model\Store::DEFAULT_STORE_ID && $title === null) {
107107
return true;
108108
}
109-
if ($this->isEmpty($title)) {
109+
110+
// checking whether title is null and also changed is_empty to is_null
111+
if ($title === null) {
110112
return false;
111113
}
112114

app/code/Magento/Catalog/Model/ResourceModel/Product/Option/Value.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@ protected function _saveValueTitles(AbstractModel $object)
256256
$object->unsetData('title');
257257
}
258258

259-
if ($object->getTitle()) {
259+
/*** Checking whether title is not null ***/
260+
if ($object->getTitle()!= null) {
260261
if ($existInCurrentStore) {
261262
if ($storeId == $object->getStoreId()) {
262263
$where = [

app/code/Magento/Sales/Model/Order/Pdf/Items/Invoice/DefaultInvoice.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ public function draw()
127127
'feed' => 35,
128128
];
129129

130-
if ($option['value']) {
130+
// Checking whether option value is not null
131+
if ($option['value']!= null) {
131132
if (isset($option['print_value'])) {
132133
$printValue = $option['print_value'];
133134
} else {

app/code/Magento/Sales/Model/Order/Pdf/Items/Shipment/DefaultShipment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function draw()
8989
];
9090

9191
// draw options value
92-
if ($option['value']) {
92+
if ($option['value']!= null) {
9393
$printValue = isset(
9494
$option['print_value']
9595
) ? $option['print_value'] : $this->filterManager->stripTags(

0 commit comments

Comments
 (0)