Skip to content

Commit

Permalink
Update background image for homepage (#325)
Browse files Browse the repository at this point in the history
* Update background image for homepage

* Add missing files

* Add missing files
  • Loading branch information
davidmoltin authored Nov 18, 2024
1 parent e6665fe commit 33ab00f
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ sidebar_position: 1
1. Select the end date in the **End Date** field.
1. Enter the priority number in the **Assign a priority** field. This field determines the order of the stackable promotions that can be applied simultaneously. Each promotion must have a unique priority number. If you assign a priority number that is already in use by another promotion, you will receive an error message.

This step is optional. If a priority is not assigned, promotions will be applied in the order of their creation dates, with the newest promotions applied first and discounted prices calculated against any previously-discounted item prices.
This step is optional. If a priority is not assigned, promotions will be applied in the order of their creation dates, with the newest promotions applied first and discounted prices calculated against any previously-discounted item prices.
1. Select the **Enabled** toggle to activate the promotion. It is disabled by default.
1. Select the **Stackable** toggle to allow multiple promotions to be stacked. This option is disabled by default and controls whether a promotion can be stacked with others. If this toggle is not enabled, no other promotion can stack on top. The promotion with the highest priority will take precedence. See [Stacking and Prioritizing](/docs/commerce-manager/promotions-builder/#stacking-and-prioritizing-multiple-promotions)
1. (Optional) Select the **Coupon-driven** checkbox to manually [create a single code](/docs/commerce-manager/promotions-builder/creating-promotion-codes#creating-a-single-code). If not selected, a promotion code is automatically generated for you.
Expand All @@ -28,26 +28,26 @@ In the **Create your rules** section, do the following:
1. Select a currency for the promotion in the **Currency** field.
1. Choose eligible catalogs for the promotion in the **Catalog** field.
1. Under **Conditions**, select **all** to apply all conditions.
- **Cart**: Configure the promotion by setting either a minimum cart subtotal or quantity of cart items. You can also add conditions to exclude certain items from the cart eligibility. See [Creating a Cart Condition](#creating-a-cart-condition).
- **Cart Items**: Specify the desired product quantity or value. You can also add exclusions that will not contribute to the cart eligibility. See [Creating a Cart Items Condition](#creating-a-cart-items-condition).
- **Custom Attributes**: Define conditions based on custom attributes. See [Adding Cart Custom Attributes](#adding-cart-custom-attributes).
- **Cart**: Configure the promotion by setting either a minimum cart subtotal or quantity of cart items. You can also add conditions to exclude certain items from the cart eligibility. See [Creating a Cart Condition](#creating-a-cart-condition).
- **Cart Items**: Specify the desired product quantity or value. You can also add exclusions that will not contribute to the cart eligibility. See [Creating a Cart Items Condition](#creating-a-cart-items-condition).
- **Custom Attributes**: Define conditions based on custom attributes. See [Adding Cart Custom Attributes](#adding-cart-custom-attributes).

### Creating a Cart Condition

1. Select **Cart** in the **Conditions** section.
1. Set the basic conditions:
1. Choose either **Subtotal** or **Items quantity** to specify a condition for the cart.
1. Select an operator from the following options:
- **is equal to**
- **is greater than**
- **is equal or greater than**
- **is less than**
- **is equal or less than**

1. If you selected **Subtotal**, enter the desired amount. This value is used to determine the subtotal of the cart, based on the operator selected in the previous step. For example, if you selected the **is greater than** operator, the **Subtotal** must exceed the specified amount.
1. If you selected **Items quantity**, enter the required quantity.

You can add multiple conditions according to your business requirements.
1. Choose either **Subtotal** or **Items quantity** to specify a condition for the cart.
1. Select an operator from the following options:
- **is equal to**
- **is greater than**
- **is equal or greater than**
- **is less than**
- **is equal or less than**

1. If you selected **Subtotal**, enter the desired amount. This value is used to determine the subtotal of the cart, based on the operator selected in the previous step. For example, if you selected the **is greater than** operator, the **Subtotal** must exceed the specified amount.
1. If you selected **Items quantity**, enter the required quantity.

You can add multiple conditions according to your business requirements.
1. Define exclusions. To exclude items from the promotion, either select **copy exclusions from actions**, or select **Add an exclusion** and then make changes as needed. See [Adding Exclusions](#adding-exclusions).
1. Click **Done** to apply the conditions.

Expand All @@ -56,9 +56,9 @@ In the **Create your rules** section, do the following:
1. Select **Cart Items** in the **Conditions** section.
1. Choose **is** to include cart items in the promotion.
1. Specify the type of cart items:
- **product**: Select the **+** icon. Then, in the **Select Product** window either select a product from the list or include a custom SKU in the **Add Custom SKU** field. For instructions on searching for products in the **Select Product** window, see [Searching for Products](#searching-for-products).
- **node/hierarchy (category)**: Select the **+** icon and select the hierarchy checkbox. Then, click the hierarchy if you want to add nodes to your promotion conditions.
- **attribute**: Select the template from the list, select the attribute, and then set the value for the selected attribute.
- **product**: Select the **+** icon. Then, in the **Select Product** window either select a product from the list or include a custom SKU in the **Add Custom SKU** field. For instructions on searching for products in the **Select Product** window, see [Searching for Products](#searching-for-products).
- **node/hierarchy (category)**: Select the **+** icon and select the hierarchy checkbox. Then, click the hierarchy if you want to add nodes to your promotion conditions.
- **attribute**: Select the template from the list, select the attribute, and then set the value for the selected attribute.
1. Define exclusions. To exclude items from the promotion, either select **copy exclusions from actions**, or select **Add an exclusion** and then make changes as needed. See [Adding Exclusions](#adding-exclusions)..

1. Click **Done** to apply the conditions.
Expand All @@ -76,10 +76,10 @@ For example, you may want to add a custom attribute for a customer’s membershi
1. Select **Custom Attributes** in the **conditions** section.
1. Enter the name of your attribute key. For example, you can enter *membership level*.
1. Choose one of the following types depending on your attribute key.
- **String**
- **Float**
- **Integer**
- **Boolean**
- **String**
- **Float**
- **Integer**
- **Boolean**
1. Enter the specific value depending on your attribute. For example, *gold* or *silver*.
1. Click **Done** to apply the changes.

Expand Down Expand Up @@ -133,12 +133,12 @@ To create a BXGY promotion, do the following:
1. If you selected **amount**, specify the amount for the promotion.
1. Select **all**, **cheapest**, or **most expensive** items in the cart to qualify for the promotion.
1. Specify the type of items to include in the promotion from the following options:
- **product**: Select the **+** icon. Then, in the **Select Product** window either select a product from the list or include a custom SKU in the **Add Custom SKU** field. For instructions on searching for products in the **Select Product** window, see [Searching for Products](#searching-for-products).
- **node/hierarchy (category)**: Select the **+** icon and select the hierarchy checkbox. Then, click the hierarchy if you want to add nodes to your promotion.
- **Attribute**: To add the attribute, do the following:
1. Select the template from the list.
1. Select the attribute from the list.
1. Select the value from the list corresponding to the chosen attributes.
- **product**: Select the **+** icon. Then, in the **Select Product** window either select a product from the list or include a custom SKU in the **Add Custom SKU** field. For instructions on searching for products in the **Select Product** window, see [Searching for Products](#searching-for-products).
- **node/hierarchy (category)**: Select the **+** icon and select the hierarchy checkbox. Then, click the hierarchy if you want to add nodes to your promotion.
- **Attribute**: To add the attribute, do the following:
1. Select the template from the list.
1. Select the attribute from the list.
1. Select the value from the list corresponding to the chosen attributes.
1. Define exclusions. To exclude items from the promotion, either select **copy exclusions from conditions**, or select **Add an exclusion** and then make changes as needed. See [Adding Exclusions](#adding-exclusions).
1. Click **+ more options**.
1. Enter the value to assign a maximum allowed discount for the promotion. This field is shown only if you choose **percentage** as your discount type.
Expand All @@ -158,7 +158,7 @@ To create a shipping discount promotion, do the following:
1. (Optional) If there is targeted shipping type for discount, then select **+ more options**.
1. Check the checkbox **Apply discount to**.
1. Enter the shipping type value that matches targeted cart shipping group `shipping_type` value and hit Enter. For example, "fedex", "UPS".
- You can add more than one.
- You can add more than one.
1. Click **Done** to apply the changes.

## Adding Exclusions
Expand All @@ -167,27 +167,27 @@ Exclusions allow you to exclude specific items from the promotion, ensuring they

1. Select **Add an exclusion**.
1. Choose one of the following exclusion types:
- **product**: Enter the values directly or select **view list**. In the **Select Product** window, either choose a product from the list or enter a custom SKU. in the **Add Custom SKU** field. For instructions on searching for products in the **Select Product** window, see [Searching for Products](#searching-for-products).
- **node/hierarchy (category)**: Either enter the unique identifiers directly or select **view list**, then select the checkboxes for the desired nodes/hierarchies(categories).
- **attribute**: Select the template from the list, choose the attribute, and then set the value for the selected attribute.
- **product**: Enter the values directly or select **view list**. In the **Select Product** window, either choose a product from the list or enter a custom SKU. in the **Add Custom SKU** field. For instructions on searching for products in the **Select Product** window, see [Searching for Products](#searching-for-products).
- **node/hierarchy (category)**: Either enter the unique identifiers directly or select **view list**, then select the checkboxes for the desired nodes/hierarchies(categories).
- **attribute**: Select the template from the list, choose the attribute, and then set the value for the selected attribute.
1. Click **Done** apply the exclusions.

## Searching for Products

To find specific products to include in your promotion, follow these steps in the **Search Product** Window:

1. In the first column, select the drop-down arrow and choose any one of the following options to search for the product based on:
- **SKU**
- **Name**
- **Slug**
- **UPC/EAN**
- **MPN**
- **Description**
- **SKU**
- **Name**
- **Slug**
- **UPC/EAN**
- **MPN**
- **Description**
1. In the next column, select the drop-down arrow and choose any one of the following options:
- **is**
- **is like**
- **ends with**
- **starts with**
- **is**
- **is like**
- **ends with**
- **starts with**

1. In the **Find product** field, enter the desired value based on your selection in the previous steps.
1. Select **Search**.
Expand All @@ -198,10 +198,20 @@ You can duplicate an existing promotion and reuse its details as required in a n

1. Go to **STORE > Promotions Builder**.
1. To duplicate a promotion, follow one of these steps on the **All Promotions** page:
- In the **Actions** column, click the ellipsis next to the promotion's name, then select **Duplicate**.
- Open the promotion you want to duplicate, and click **Duplicate** at the bottom of the page.
- In the **Actions** column, click the ellipsis next to the promotion's name, then select **Duplicate**.
- Open the promotion you want to duplicate, and click **Duplicate** at the bottom of the page.

The duplicated promotion opens. Make the necessary updates, then click **Create Promotion** to save the new promotion.

## Editing Custom Fields in a Promotion
In order to use custom fields in Promotions Builder, you need to create flows in the store. See [Creating FLows](/docs/commerce-manager/flows) for how to create flows. The **slug** value for promotions builder is **rule-promotions**.
Once you have created the flows and field, then you can edit the custom fields in promotions builder.

1. In the promotions builder editing page, locate the **Custom Fields** at the bottom of page.
1. Expand the section.
1. Edit the fields.
1. Click **Save** to save the changes.

The duplicated promotion opens. Make the necessary updates, then click **Create Promotion** to save the new promotion.

## Editing Custom Fields in a Promotion
In order to use custom fields in Promotions Builder, you need to create flows in the store. See [Creating FLows](/docs/commerce-manager/flows) for how to create flows. The **slug** value for promotions builder is **rule-promotions**.
Expand All @@ -215,4 +225,5 @@ Once you have created the flows and field, then you can edit the custom fields i

## Related Resources

- [Rule Promotions API](/docs/promotions-builder/promotions-builder-api/promotions-builder-api-overview)
- [Rule Promotions API](/docs/promotions-builder/promotions-builder-api/promotions-builder-api-overview)

2 changes: 1 addition & 1 deletion src/components/homepage/ui/AbstractBG.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
export default function () {
return (
<div className="z-0 absolute w-[100vw] h-full">
<div className="w-full h-full dark:bg-[url('/assets/homepage/blenddark2.webp')] bg-center bg-no-repeat bg-cover"></div>
<div className="w-full dark:bg-[url('/assets/homepage/blenddark2.webp')] bg-center bg-no-repeat bg-cover"></div>
</div>
);
}
1 change: 0 additions & 1 deletion src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -1384,7 +1384,6 @@ html[data-theme="dark"] .header-github-link:before {

@layer utilities {
.bg-homepage-gradient {
@apply dark:bg-[url('/assets/homepage/blenddark2.webp')] bg-top
}

.fill-box {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function Homepage() {
useLinkedinInsight();

return (
<div className="dev-homepage h-full dark:bg-[url('/assets/homepage/blenddark2.webp')] bg-center bg-no-repeat bg-cover bg-white scroll-smooth">
<div className="dev-homepage dark:bg-[url('/assets/homepage/dev-site-blend.webp')] bg-cover bg-white scroll-smooth">
<Layout
description="Build scalable, API-driven commerce experiences with Elastic Path's headless commerce platform. Unlock seamless integrations and automate operations through our open API, empowering developers to craft innovative shopping experiences."
wrapperClassName="relative homepage flex flex-col relative"
Expand Down
Binary file added static/assets/homepage/dev-site-blend.webp
Binary file not shown.

0 comments on commit 33ab00f

Please sign in to comment.