Skip to content

Commit

Permalink
add bulk-price-manipulator v1
Browse files Browse the repository at this point in the history
  • Loading branch information
djkato committed Jan 1, 2025
1 parent 34670c3 commit 7f5b000
Show file tree
Hide file tree
Showing 23 changed files with 2,152 additions and 511 deletions.
6 changes: 5 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ APP_IFRAME_BASE_URL="http://10.100.110.60:3000"
APL="File"
APL_URL="apl.json"
LOG_LEVEL="DEBUG"
CHANNEL_SLUG="default-channel"

## THESE VARIABLES ARE FOR SITEMAP-GENERATOR APP
CHANNEL_SLUG="default-channel"
SITEMAP_TARGET_FOLDER="./temp"
# Available fields can be found in ./sitemap-generator/src/queries/event_subjects_updated.rs: ProductUpdate
SITEMAP_PRODUCT_TEMPLATE="https://example.com/{product.category.slug}/{product.slug}"
Expand All @@ -30,3 +30,7 @@ ACTIVE_PAYMENT_METHODS="cod,cash,transfer"
LOCALE="Sk"
# uses https://crates.io/crates/iso_currency
CURRENCIES="EUR"

## BULK-PRICE-MANIPULATOR
PRICE_EXPRESSION='if(variant.product.product_type.name == str::from("Shoe"), 0.02, variant.pricing.undiscounted.gross.amount)'
COST_PRICE_EXPRESSION='if(variant.product.product_type.name == str::from("Shoe"), 0.01, variant.pricing.undiscounted.gross.amount)'
6 changes: 5 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ APP_IFRAME_BASE_URL="http://app-name.site.com"
APL="Redis"
APL_URL="redis://localhost:6379/1"
LOG_LEVEL="DEBUG"
CHANNEL_SLUG="zakladny"

## THESE VARIABLES ARE FOR SITEMAP-GENERATOR APP
CHANNEL_SLUG="zakladny"
SITEMAP_TARGET_FOLDER="./temp"
# Available fields can be found in ./sitemap-generator/src/queries/event_subjects_updated.rs: ProductUpdate
SITEMAP_PRODUCT_TEMPLATE="https://example.com/{product.category.slug}/{product.slug}"
Expand All @@ -30,3 +30,7 @@ ACTIVE_PAYMENT_METHODS="cod,cash,transfer"
LOCALE="Sk"
# uses https://crates.io/crates/iso_currency
CURRENCIES="EUR"

## BULK-PRICE-MANIPULATOR
PRICE_EXPRESSION='if(variant.product.product_type.name == str::from("Shoe"), 0.02, variant.pricing.undiscounted.gross.amount)'
COST_PRICE_EXPRESSION='if(variant.product.product_type.name == str::from("Shoe"), 0.01, variant.pricing.undiscounted.gross.amount)'
Loading

0 comments on commit 7f5b000

Please sign in to comment.