This commit is contained in:
parent
3939c21a72
commit
a97ba6e858
@ -191,23 +191,25 @@ class PricingService:
|
|||||||
increment -= Decimal('0.01')
|
increment -= Decimal('0.01')
|
||||||
markup_bands = adjusted_bands
|
markup_bands = adjusted_bands
|
||||||
|
|
||||||
if FREE_SHIPPING:
|
#if FREE_SHIPPING:
|
||||||
if tcg_low_shipping and (tcg_low >= Decimal('5.00')):
|
#if tcg_low_shipping and (tcg_low >= Decimal('5.00')):
|
||||||
tcg_compare_price = tcg_low_shipping
|
#tcg_compare_price = tcg_low_shipping
|
||||||
elif tcg_low_shipping and (tcg_low < Decimal('5.00')):
|
#elif tcg_low_shipping and (tcg_low < Decimal('5.00')):
|
||||||
tcg_compare_price = max(tcg_low_shipping - Decimal('1.31'), tcg_low)
|
#tcg_compare_price = max(tcg_low_shipping - Decimal('1.31'), tcg_low)
|
||||||
elif tcg_low:
|
#elif tcg_low:
|
||||||
tcg_compare_price = tcg_low
|
#tcg_compare_price = tcg_low
|
||||||
else:
|
#else:
|
||||||
logger.warning(f"No TCG low or shipping price available for row: {row}")
|
#logger.warning(f"No TCG low or shipping price available for row: {row}")
|
||||||
row['new_price'] = None
|
#row['new_price'] = None
|
||||||
return row
|
#return row
|
||||||
else:
|
#else:
|
||||||
tcg_compare_price = tcg_low
|
#tcg_compare_price = tcg_low
|
||||||
if tcg_compare_price is None:
|
#if tcg_compare_price is None:
|
||||||
logger.warning(f"No TCG low price available for row: {row}")
|
#logger.warning(f"No TCG low price available for row: {row}")
|
||||||
row['new_price'] = None
|
#row['new_price'] = None
|
||||||
return row
|
#return row
|
||||||
|
|
||||||
|
tcg_compare_price = tcg_low
|
||||||
|
|
||||||
# Apply the smoothed markup
|
# Apply the smoothed markup
|
||||||
new_price = self.smooth_markup(tcg_compare_price, markup_bands)
|
new_price = self.smooth_markup(tcg_compare_price, markup_bands)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user