docs: added code blocks without headers (#2560)
This commit is contained in:
@@ -235,7 +235,7 @@ If the batch job has been pre-processed, the status of the batch job will be `pr
|
||||
|
||||
Here’s an example of the `result` property:
|
||||
|
||||
```json
|
||||
```json noHeader
|
||||
"result": {
|
||||
"count": 5, // Total number of prices to be added
|
||||
"stat_descriptors": [ //details about the prices to be added
|
||||
|
||||
@@ -223,14 +223,14 @@ If the batch job has been pre-processed, the status of the batch job will be `pr
|
||||
|
||||
Here’s an example of the `result` property:
|
||||
|
||||
```jsx
|
||||
```json noHeader
|
||||
"result": {
|
||||
"count": 5, // Total number of products to be created or updated
|
||||
"stat_descriptors": [ //details about the products to be created/updated
|
||||
{
|
||||
"key": "product-import-count",
|
||||
"name": "Products/variants to import",
|
||||
"message": "There will be 2 products created (0 updated).\n 3 variants will be created and 0 updated"
|
||||
"message": "There will be 2 products created (0 updated).\n 3 variants will be created and 0 updated"
|
||||
}
|
||||
],
|
||||
"advancement_count": 0 //number of products processed so far. Will be 0 before the import is confirmed.
|
||||
|
||||
@@ -349,7 +349,7 @@ curl --location --request GET '<YOUR_SERVER>/admin/batch-jobs/<BATCH_JOB_ID>' \
|
||||
|
||||
Based on the batch job strategy implemented in this documentation, the `result` property could be something like this:
|
||||
|
||||
```jsx
|
||||
```json noHeader
|
||||
"result": {
|
||||
"count": 1,
|
||||
"stat_descriptors": [
|
||||
|
||||
@@ -111,7 +111,7 @@ Once it is time to run your cron job based on the cron job expression pattern, t
|
||||
|
||||
For example, the above cron job will run at 12 AM and, when it runs, you can see the following logged on your Medusa server:
|
||||
|
||||
```bash
|
||||
```bash noHeader
|
||||
info: Processing cron job: publish-products
|
||||
```
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ A customer group is stored in the database as a [CustomerGroup](../../../refere
|
||||
|
||||
Similar to all entities in Medusa, you can use the `metadata` object attribute to store any custom data you want. For example, you can add some flag or tag to the customer group for a custom use case:
|
||||
|
||||
```jsx
|
||||
```jsx noHeader
|
||||
metadata: {
|
||||
is_seller: true
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ Be careful with your file names as it can cause unclear errors in Typeorm. Make
|
||||
|
||||
Before trying this step make sure that you’ve created and run your migrations. You also need to re-build your code using:
|
||||
|
||||
```bash npm2yarn
|
||||
```bash npm2yarn noHeader
|
||||
npm run build
|
||||
```
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ If files and directories aren't placed in the root of your plugin, the Medusa se
|
||||
|
||||
An example of a plugin's directory before testing or publishing:
|
||||
|
||||
```
|
||||
```bash noHeader
|
||||
medusa-plugin-custom
|
||||
|
|
||||
|_ _ _ api
|
||||
|
||||
@@ -37,7 +37,7 @@ When you create a price list, you can specify different conditions to control wh
|
||||
|
||||
In the body of your request, aside from the required fields, you can send the following fields to apply different conditions:
|
||||
|
||||
```js
|
||||
```js noHeader
|
||||
{
|
||||
prices: [
|
||||
{
|
||||
|
||||
@@ -72,7 +72,7 @@ This method accepts the variant ID as a first parameter and the [context](./inde
|
||||
|
||||
This method must return an object having the following fields:
|
||||
|
||||
```typescript
|
||||
```typescript noHeader
|
||||
{
|
||||
originalPrice, //number | null
|
||||
calculatedPrice, //number | null
|
||||
|
||||
@@ -54,7 +54,7 @@ In this section, you'll learn how to use services throughout your Medusa server.
|
||||
|
||||
Before using your service, make sure you run the `build` command:
|
||||
|
||||
```bash npm2yarn
|
||||
```bash npm2yarn noHeader
|
||||
npm run build
|
||||
```
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ The `ShippingMethod` entity also has the `includes_tax` attribute. Its value is
|
||||
|
||||
When a price is tax-inclusive, the tax amount is calculated using the following formula:
|
||||
|
||||
```jsx
|
||||
```jsx noHeader
|
||||
const taxAmount = (taxRate * taxInclusivePrice) / (1 + taxRate)
|
||||
```
|
||||
|
||||
@@ -110,7 +110,7 @@ Price lists include a list of prices that can be used to override the original p
|
||||
|
||||
Each variant’s price in the price list is compared to the variant’s original price using the following condition:
|
||||
|
||||
```jsx
|
||||
```jsx noHeader
|
||||
amount < (1 + taxRate) * calculatedPrice
|
||||
```
|
||||
|
||||
@@ -120,7 +120,7 @@ Where `amount` is the amount of the variant’s price in the price list, `taxRat
|
||||
|
||||
Here is an example of these fields when tax inclusivity is enabled for both the currency and the price list:
|
||||
|
||||
```jsx
|
||||
```jsx noHeader
|
||||
{
|
||||
original_price: 110,
|
||||
calculated_price: 100,
|
||||
|
||||
Reference in New Issue
Block a user