# Product Card

## **Product label settings**

<figure><img src="https://3988388892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX39aWWRJk2Y01xGBqnJw%2Fuploads%2Ffbs0561qhk4n7IaEfynH%2Fproduct-card-1.png?alt=media&#x26;token=ca05532f-3efa-46d8-8968-643141fb3b97" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3988388892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX39aWWRJk2Y01xGBqnJw%2Fuploads%2FbtudiA6Uj5ZrNAxxgFAJ%2FUntitled.png?alt=media&#x26;token=3a5b0097-71f2-4121-a5c8-8b351d98865f" alt=""><figcaption></figcaption></figure>

### Labels

<figure><img src="https://3988388892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX39aWWRJk2Y01xGBqnJw%2Fuploads%2FENkTHjUG4m4Jykcr4HsH%2FUntitled%20(1).png?alt=media&#x26;token=2564fdd3-3a37-4e16-ab60-268f81fd3670" alt=""><figcaption></figcaption></figure>

1. **`Enable labels`** - the setting is responsible for whether **labels (badges/tags)** will be shown on the product card. For the label to be displayed, a tag must be added to the product, for example, `label_new` is the base label that will display `NEW` with the base color. To change the type of a label, you need to add a `:type`, such as `label__new:primary` or `label__new:secondary`. The number of displayed **labels is limited to 3,** as well as a `soldout` **label** in case the product is not available;
2. For each type of **label,** there are color settings. This way you can change the color for the **label** text: `primary`, `secondary`, `base`, `soldout`;
3. The background is specified for each **label**;
4. The border color is specified for each **label**;
5. Background transparency is specified for each **label** using a range **step** range of 10%. The minimum value is **10%** and the maximum is **100%**.

You can add image labels, like this:

<figure><img src="https://3988388892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX39aWWRJk2Y01xGBqnJw%2Fuploads%2FYauLBoSp7AAelAR6grYb%2Fproduct-card-2.png?alt=media&#x26;token=d687f243-053d-4bec-a402-d836808eaa98" alt=""><figcaption></figcaption></figure>

To do this you need add a metafield to the product.

Go to the Admin panel / Settings/ Custom data

<figure><img src="https://3988388892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX39aWWRJk2Y01xGBqnJw%2Fuploads%2FKb0230lDhA7cqg92XVnR%2FUntitled%20(2).png?alt=media&#x26;token=621f06b2-124b-4d20-bbb0-7e022e183d86" alt=""><figcaption></figcaption></figure>

Select “Products” metafield:

<figure><img src="https://3988388892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX39aWWRJk2Y01xGBqnJw%2Fuploads%2FBPiaZkig4nERGfHGW3Wt%2FUntitled%20(3).png?alt=media&#x26;token=eaf00e8c-f189-48c5-8773-bcb825083428" alt=""><figcaption></figcaption></figure>

Click “**Add definition**” button:

<figure><img src="https://3988388892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX39aWWRJk2Y01xGBqnJw%2Fuploads%2F0TrmYMrFE4GiDrTUGURV%2FUntitled%20(4).png?alt=media&#x26;token=57703f50-f914-4f89-afdd-bee7a79c1a42" alt=""><figcaption></figcaption></figure>

Create a metafield with “**Badge image**” name. Check the “Namespace and key” is "**custom.badge\_image**”. Choose the “File” type, “List of values” and accept only the images.

You can add a MAXIMUM 3 logo images.

<figure><img src="https://3988388892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX39aWWRJk2Y01xGBqnJw%2Fuploads%2FOjr08XyNQbVLoNSglgrP%2FUntitled%20(5).png?alt=media&#x26;token=249d1d28-88c1-4487-87c1-47c22b63bb19" alt=""><figcaption></figcaption></figure>

## **Product card settings**

<figure><img src="https://3988388892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX39aWWRJk2Y01xGBqnJw%2Fuploads%2FUxtlq7u9JxbPbnXRSvUt%2FUntitled%20(6).png?alt=media&#x26;token=4934eddf-0a15-4d2f-b1de-5fba60977269" alt=""><figcaption></figcaption></figure>

### General

<figure><img src="https://3988388892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX39aWWRJk2Y01xGBqnJw%2Fuploads%2FjGaMM7Eek6Y0hjabEKc3%2FUntitled%20(7).png?alt=media&#x26;token=4776d87f-c217-46c3-b99d-02d1184a0908" alt=""><figcaption></figcaption></figure>

1. **`Show vendor`** - the setting is responsible for showing/hiding the product vendor;
2. **`SKU text`** - the setting is responsible for show a SKU of the product;
3. **`Enable quick view`** - the setting is responsible for enabling/disabling quick view. Otherwise, the user will need to go to the product to see other options and add to the cart;
4. **`Quick view button type`** - the setting is responsible for the appearance of the quick view button;
5. **`Show currency code`** - setting responsible for whether the **currency code** will be shown;
6. **`Enable image change on hover`** - the setting is responsible for whether the second image (video) will be shown on **hover**. By default the second product image will be used for the hover. To add an image (video), you need to add the `product_card.hover_image` **metafield**, where `product_card` is the **namespace** and `hover_image` is the **field name**. The `Content type` must be a `file`.
   * If **color swatches** are disabled, then you need to add this field only to the product;
   * If **color swatches** are enabled, you must also add this field to the variant;
   * If **color swatches** are enabled and other options are present, for example, **size**, **material**, etc., then you need to add an image only to the first variant of each color.
7. **`Image aspect ratio`** - aspect ratio of the image. Can be “Square” or “Portrait”.
8. **`Object fit image`** - the setting is responsible for stretching the image. If **Cover(default)** is selected - the image will take all the space available for it, that is, it will stretch as much as possible, and if **Contain** - it will retain its proportions.

### Colors

<figure><img src="https://3988388892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX39aWWRJk2Y01xGBqnJw%2Fuploads%2FN3WWUtXXZ8IWxTsbd5eY%2FUntitled%20(8).png?alt=media&#x26;token=00922ddc-59b1-4959-a8e5-e978e8e2c613" alt=""><figcaption></figcaption></figure>

1. **`Quick buttons background`** - setting allows you to specify the background color of quick buttons;
2. **`Quick buttons border color`** - setting allows you to specify the border color of quick buttons;
3. **`Quick buttons color`** - setting allows you to specify the icon color of quick buttons.

### Text button colors

<figure><img src="https://3988388892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX39aWWRJk2Y01xGBqnJw%2Fuploads%2FfCMA6NS2YpLL82QuAs5l%2FUntitled%20(9).png?alt=media&#x26;token=ace908ea-7d16-4ebf-b1c7-f63715db9bb4" alt=""><figcaption></figcaption></figure>

1. **`Text`** - the setting allows you to set the color of the button text;
2. **`Background`** - the setting allows you to set the color of the button background color;
3. **`Border`** - the setting allows you to set the color of the button border color;
4. **`Text (hover)`** - the setting allows you to set the color of the button text on hover;
5. **`Background (hover)`** - the setting allows you to set the color of the button background color on hover;
6. **`Border (hover)`** - the setting allows you to set the color of the button border color on hover.

## **Additional information**

1. **Color swatch** settings. **Color swatches** depend on the `Color` option. The name of the color is split, and the last word is taken and substituted into the **CSS palette**. There is a chance that this color will not be in the **CSS palette**, then it will just be a white **swatch**. In this case, you must add an image to **Shopify** files of `50*50` px size in `.png` format with the `swatch-` prefix. For example, the image name for `banana-yellow` would be `swatch-banana-yellow.png`.
2. **Color swatch** settings. For example, if a user has a purely German store, whose color option is called - `Farbe`, thus the user will need to specify the name in the **swatch option** setting. The default value is `Color`.
3. **Labels settings**. For the **label** to be displayed, a tag must be added to the product, for example, `label_new` is the base **label** that will display `NEW` with the base color. To change the type of a **label**, you need to add a `:type`, such as `label__new:primary` or `label__new:secondary`. The number of displayed **labels** is **limited to 3**, as well as a **soldout label** in case the product is not available. Also you can add a 3 images label with metafields.
4. **The second image is on hover** settings. To add an image, you need to add the `product_card.hover_image` metafield, where `product_card` is the **namespace** and `hover_image` is the **field name**. The `Content type` must be a `file`, where only one file is allowed, namely an image.
   * If **color swatches** are disabled, then you need to add this field only to the product;
   * If **color swatches** are enabled, you must also add this field to the variant;
   * If **color swatches** are enabled and other options are present, such as `size`, `material`, etc., then you only need to add an image to the first variant of each color.
5. You can add an extra information about the product:

<figure><img src="https://3988388892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX39aWWRJk2Y01xGBqnJw%2Fuploads%2FVl6S7BxjYDCUuWVml5m2%2Fproduct-card-3.png?alt=media&#x26;token=8887f726-624f-4fe6-9bad-9ace0a42624a" alt=""><figcaption></figcaption></figure>

To do this you need to add a metafield to the product. Add to the product a metafield with a name “**Extra properties**”. Check the “Namespace and key” is "**custom.extra\_properties**”. Choose the “Single line text” type, “List of values”.

Wrap a name of the property to the `<span>` tag. Example: `<span>`DIsplay type`</span>` OLED.

See the example in the screenshot:

<figure><img src="https://3988388892-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX39aWWRJk2Y01xGBqnJw%2Fuploads%2FUxNPGA4oGxdtTPhvlEOA%2Fproduct-card-4.png?alt=media&#x26;token=aff2d1bc-a484-47ec-8c50-15eafc8a4fe6" alt=""><figcaption></figcaption></figure>
