Skip to content

Commit b13ceae

Browse files
committed
More fixes
1 parent a88fc80 commit b13ceae

File tree

7 files changed

+22
-23
lines changed

7 files changed

+22
-23
lines changed

docs/commerce/cart/cart_api.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ $cart = $cartService->updateCartMetadata($cart, $updateMetadataStruct);
8080
To delete a cart permanently, use the `CartServiceInterface::deleteCart` method and pass the `CartInterface` object:
8181

8282
``` php
83-
[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 61, 63) =]]
84-
[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 122, 124) =]]
83+
[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 61, 62) =]]
84+
[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 122, 123) =]]
8585
```
8686

8787
## Empty cart
@@ -135,9 +135,8 @@ To change entry metadata, use the `CartServiceInterface::updateEntry` method and
135135
``` php
136136
[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 12, 13) =]]
137137
// ...
138-
139138
[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 61, 62) =]]
140-
[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 107, 109) =]]
139+
[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 107, 108) =]]
141140
[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 112, 120) =]]
142141
```
143142

@@ -185,5 +184,5 @@ To combine the contents of multiple shopping carts into a target cart, use the `
185184
This operation is helpful when you want to consolidate items from a reorder cart and a current cart into a single order.
186185

187186
```php
188-
[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 125, 137) =]]
187+
[[= include_file('code_samples/api/commerce/src/Command/CartCommand.php', 124, 137) =]]
189188
```

docs/commerce/order_management/order_management_api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ To fetch multiple orders, use the [`OrderServiceInterface::findOrders`](/api/php
3636
It follows the same search query pattern as other APIs:
3737

3838
``` php
39-
[[= include_file('code_samples/api/commerce/src/Command/OrderCommand.php', 9, 14) =]]
39+
[[= include_file('code_samples/api/commerce/src/Command/OrderCommand.php', 8, 14) =]]
4040

4141
// ...
4242
[[= include_file('code_samples/api/commerce/src/Command/OrderCommand.php', 104, 113) =]]

docs/commerce/payment/payment_method_api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ To create a payment method, use the `PaymentMethodService::createPaymentMethod`
5959
- `options` object.
6060

6161
``` php
62-
[[= include_file('code_samples/api/commerce/src/Command/PaymentMethodCommand.php', 50, 51) =]][[= include_file('code_samples/api/commerce/src/Command/PaymentMethodCommand.php', 70, 79) =]]
62+
[[= include_file('code_samples/api/commerce/src/Command/PaymentMethodCommand.php', 50, 51) =]][[= include_file('code_samples/api/commerce/src/Command/PaymentMethodCommand.php', 69, 79) =]]
6363
```
6464

6565
## Update payment method

docs/commerce/shipping_management/shipment_api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ From the developer's perspective, shipments are referenced with a UUID identifie
1616
To access a single shipment by using its string identifier, use the `ShipmentService::getShipmentByIdentifier` method:
1717

1818
``` php
19-
[[= include_file('code_samples/api/commerce/src/Command/ShipmentCommand.php', 56, 64) =]]
19+
[[= include_file('code_samples/api/commerce/src/Command/ShipmentCommand.php', 55, 64) =]]
2020
```
2121

2222
### Get single shipment by id
2323

2424
To access a single shipment by using its numerical id, use the `ShipmentService::getShipment` method:
2525

2626
``` php
27-
[[= include_file('code_samples/api/commerce/src/Command/ShipmentCommand.php', 44, 53) =]]
27+
[[= include_file('code_samples/api/commerce/src/Command/ShipmentCommand.php', 43, 53) =]]
2828
```
2929

3030
## Get multiple shipments

docs/commerce/shipping_management/shipping_method_api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ To access a shipping method by using its identifier, use the `ShippingMethodServ
1717
The method takes a string as `$identifier` parameter and uses a prioritized language from SiteAccess settings unless you pass another language as `forcedLanguage`.
1818

1919
``` php
20-
[[= include_file('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 51, 60) =]]
20+
[[= include_file('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 50, 60) =]]
2121
```
2222

2323
### Get shipping method by ID
@@ -26,7 +26,7 @@ To access a shipping method by using its ID, use the `ShippingMethodServiceInter
2626
The method takes a string as `$id` parameter and uses a prioritized language from SiteAccess settings unless you pass another language as `forcedLanguage`.
2727

2828
``` php
29-
[[= include_file('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 39, 48) =]]
29+
[[= include_file('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 38, 48) =]]
3030
```
3131

3232
## Get multiple shipping methods

docs/pim/catalog_api.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ To get information about product catalogs and manage them, use `CatalogServiceIn
1111
To get a single catalog, use `Ibexa\Contracts\ProductCatalog\CatalogServiceInterface::getCatalog()` and provide it with catalog ID, or `CatalogServiceInterface::getCatalogByIdentifier()` and pass the identifier:
1212

1313
``` php
14-
[[= include_file('code_samples/api/product_catalog/src/Command/CatalogCommand.php', 68, 70) =]]
14+
[[= include_file('code_samples/api/product_catalog/src/Command/CatalogCommand.php', 58, 60) =]]
1515
```
1616

1717
## Get products in catalog
@@ -20,7 +20,7 @@ To get products from a catalog, request the product query from the catalog objec
2020
Then, create a new `ProductQuery` based on it and run a product search with `ProductServiceInterface::findProduct()`:
2121

2222
``` php
23-
[[= include_file('code_samples/api/product_catalog/src/Command/CatalogCommand.php', 72, 78) =]]
23+
[[= include_file('code_samples/api/product_catalog/src/Command/CatalogCommand.php', 62, 68) =]]
2424
```
2525

2626
## Create catalog
@@ -29,7 +29,7 @@ To create a catalog, you need to prepare a `CatalogCreateStruct` that contains:
2929
Then, pass this struct to `CatalogServiceInterface::createCatalog()`:
3030

3131
``` php
32-
[[= include_file('code_samples/api/product_catalog/src/Command/CatalogCommand.php', 51, 66) =]]
32+
[[= include_file('code_samples/api/product_catalog/src/Command/CatalogCommand.php', 48, 56) =]]
3333
```
3434

3535
## Update catalog
@@ -39,5 +39,5 @@ You must pass the catalog object and a `CatalogUpdateStruct` to the method.
3939
In the following example, you update the catalog to publish it:
4040

4141
``` php
42-
[[= include_file('code_samples/api/product_catalog/src/Command/CatalogCommand.php', 80, 84) =]]
42+
[[= include_file('code_samples/api/product_catalog/src/Command/CatalogCommand.php', 70, 74) =]]
4343
```

docs/pim/price_api.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ To access a currency object by its code, use `CurrencyServiceInterface::getCurre
1212
To access a whole list of currencies, use `CurrencyServiceInterface::findCurrencies`.
1313

1414
``` php
15-
[[= include_file('code_samples/api/product_catalog/src/Command/CurrencyCommand.php', 42, 50) =]]
15+
[[= include_file('code_samples/api/product_catalog/src/Command/CurrencyCommand.php', 34, 42) =]]
1616
```
1717

1818
To create a new currency, use `CurrencyServiceInterface::createCurrency()` and provide it with a `CurrencyCreateStruct` with code, number of fractional digits and a flag indicating if the currency is enabled:
1919

2020
``` php
21-
[[= include_file('code_samples/api/product_catalog/src/Command/CurrencyCommand.php', 57, 60) =]]
21+
[[= include_file('code_samples/api/product_catalog/src/Command/CurrencyCommand.php', 50, 53) =]]
2222
```
2323

2424
## Prices
@@ -28,34 +28,34 @@ To manage prices, use `ProductPriceService`.
2828
To retrieve the price of a product in the currency for the current context, use `Product::getPrice()`:
2929

3030
``` php
31-
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 60, 63) =]]
31+
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 50, 53) =]]
3232
```
3333

3434
To retrieve the price of a product in a specific currency, use `ProductPriceService::getPriceByProductAndCurrency`:
3535

3636
``` php
37-
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 64, 67) =]]
37+
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 54, 57) =]]
3838
```
3939

4040
To get all prices (in different currencies) for a given product, use `ProductPriceService::findPricesByProductCode`:
4141

4242
``` php
43-
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 78, 84) =]]
43+
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 68, 74) =]]
4444
```
4545

4646
To load price definitions that match given criteria, use `ProductPriceServiceInterface::findPrices`:
4747

4848
``` php
4949
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 12, 16) =]]
5050
// ...
51-
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 85, 95) =]]
51+
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 75, 85) =]]
5252
```
5353

5454
You can also use `ProductPriceService` to create or modify existing prices.
5555
For example, to create a new price for a given currency, use `ProductPriceService::createProductPrice` and provide it with a `ProductPriceCreateStruct` object:
5656

5757
``` php
58-
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 69, 75) =]]
58+
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 61, 65) =]]
5959
```
6060

6161
!!! note
@@ -80,7 +80,7 @@ To resolve a price of a product in the currency for the current context, use eit
8080
``` php
8181
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 7, 8) =]][[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 11, 12) =]]
8282
// ...
83-
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 87, 90) =]]
83+
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 86, 90) =]]
8484
```
8585

8686
## VAT

0 commit comments

Comments
 (0)