Jump to content

Edit History

ps8modules

ps8modules

Three files need to be edited.

1. AdminDir/themes/new-theme/public/order_create.bundle.js

unminify this JavaScript here: https://unminify.com/   

find:

key: "renderFoundProducts",

    change to:

key: "renderFoundProducts",
	value: function (e) {
		(0, o.default)(e).forEach(function (e) {
			var t = e.name;
			var tr = e.reference;
			0 === e.combinations.length && (t += " - " + e.formattedPrice), c(a.default.productSelect).append('<option value="' + e.productId + '">' + tr+ ': '+t + "</option>");
		});
	},

 

 

2. src/Core/Domain/Product/QueryResult/FoundProduct.php

    add reference variable:

obrazek.png.3f0e78d4d89f001e9595c47a00713af8.png

  

    change __construct to:

public function __construct(
        int $productId,
        string $reference,
        string $name,
        string $formattedPrice,
        float $priceTaxIncl,
        float $priceTaxExcl,
        float $taxRate,
        int $stock,
        string $location,
        bool $availableOutOfStock,
        array $combinations = [],
        array $customizationFields = []
    ) {
        $this->productId = $productId;
        $this->reference = $reference;
        $this->name = $name;
        $this->formattedPrice = $formattedPrice;
        $this->priceTaxIncl = $priceTaxIncl;
        $this->priceTaxExcl = $priceTaxExcl;
        $this->taxRate = $taxRate;
        $this->stock = $stock;
        $this->location = $location;
        $this->availableOutOfStock = $availableOutOfStock;
        $this->combinations = $combinations;
        $this->customizationFields = $customizationFields;
    }

 

    add new function after getProductId():

    /**
     * @return string
     */
    public function getReference(): string
    {
        return $this->reference;
    }

 

 

3. src/Adapter/Product/QueryHandler/SearchProductsHandler.php

    add reference to FoundProduct:

obrazek.thumb.png.96d2b9a6de1f4660780ce13b79abb290.png

 

4. Come back here and give me a Like by clicking the gray heart below my posts 😄

ps8modules

ps8modules

Three files need to be edited.

1. AdminDir/themes/new-theme/public/order_create.bundle.js

unminify this JavaScript here: https://unminify.com/   

find:

key: "renderFoundProducts",

    change to:

key: "renderFoundProducts",
	value: function (e) {
		(0, o.default)(e).forEach(function (e) {
			var t = e.name;
			var tr = e.reference;
			0 === e.combinations.length && (t += " - " + e.formattedPrice), c(a.default.productSelect).append('<option value="' + e.productId + '">' + tr+ ': '+t + "</option>");
		});
	},

 

 

2. src/Core/Domain/Product/QueryResult/FoundProduct.php

    add reference variable:

obrazek.png.3f0e78d4d89f001e9595c47a00713af8.png

  

    change __construct to:

public function __construct(
        int $productId,
        string $reference,
        string $name,
        string $formattedPrice,
        float $priceTaxIncl,
        float $priceTaxExcl,
        float $taxRate,
        int $stock,
        string $location,
        bool $availableOutOfStock,
        array $combinations = [],
        array $customizationFields = []
    ) {
        $this->productId = $productId;
        $this->reference = $reference;
        $this->name = $name;
        $this->formattedPrice = $formattedPrice;
        $this->priceTaxIncl = $priceTaxIncl;
        $this->priceTaxExcl = $priceTaxExcl;
        $this->taxRate = $taxRate;
        $this->stock = $stock;
        $this->location = $location;
        $this->availableOutOfStock = $availableOutOfStock;
        $this->combinations = $combinations;
        $this->customizationFields = $customizationFields;
    }

 

    add new function after getProductId():

    /**
     * @return string
     */
    public function getReference(): string
    {
        return $this->reference;
    }

 

 

3. src/Adapter/Product/QueryHandler/SearchProductsHandler.php

    add reference to FoundProduct:

obrazek.thumb.png.96d2b9a6de1f4660780ce13b79abb290.png

 

4. Come back here and give me a Like by clicking on the gray heart 😄

×
×
  • Create New...