<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mediawiki.comfac.net/index.php?action=history&amp;feed=atom&amp;title=Webshop-13-Discount-Visibility-and-Urgency</id>
	<title>Webshop-13-Discount-Visibility-and-Urgency - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mediawiki.comfac.net/index.php?action=history&amp;feed=atom&amp;title=Webshop-13-Discount-Visibility-and-Urgency"/>
	<link rel="alternate" type="text/html" href="https://mediawiki.comfac.net/index.php?title=Webshop-13-Discount-Visibility-and-Urgency&amp;action=history"/>
	<updated>2026-06-05T11:03:58Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://mediawiki.comfac.net/index.php?title=Webshop-13-Discount-Visibility-and-Urgency&amp;diff=171&amp;oldid=prev</id>
		<title>Justinaquino: &quot;Add all 14 Frappe ERPNext Webshop chapter pages from wikitext-upload&quot;</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.comfac.net/index.php?title=Webshop-13-Discount-Visibility-and-Urgency&amp;diff=171&amp;oldid=prev"/>
		<updated>2026-03-06T13:00:43Z</updated>

		<summary type="html">&lt;p&gt;&amp;quot;Add all 14 Frappe ERPNext Webshop chapter pages from wikitext-upload&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= 13 - Discount Visibility &amp;amp; Offer Urgency =&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parent:&amp;#039;&amp;#039;&amp;#039; [Webshop-Index Webshop Index]  &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Previous:&amp;#039;&amp;#039;&amp;#039; [Webshop-12-Staging-Sandbox-Deployment 12 - Staging Sandbox Deployment]  &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Next:&amp;#039;&amp;#039;&amp;#039; [Webshop-14-Hypothesis-Discount-Deadline-Visibility 14 - Hypothesis: Discount Deadline Visibility]  &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Source:&amp;#039;&amp;#039;&amp;#039; [https://github.com/Comfac-Global-Group/comfac-webshop/wiki/13-Discount-Visibility-and-Urgency Comfac Webshop Wiki - Chapter 13]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Goal ==&lt;br /&gt;
&lt;br /&gt;
Make discounts, promotions, and offer deadlines clearly visible to customers throughout the shopping experience - from product browsing to cart to checkout - creating transparency and a sense of urgency.&lt;br /&gt;
&lt;br /&gt;
== Feature: Per-Item Discount Display in Cart ==&lt;br /&gt;
&lt;br /&gt;
=== What to Show per Line Item ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
+--------------------------------------------------------------------------------------+&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| [IMG] Server RAM DDR5 32GB                          Qty: 2&lt;br /&gt;
|-&lt;br /&gt;
| SKU: RAM-DDR5-32GB&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Was: $149.99  (strikethrough)&lt;br /&gt;
|-&lt;br /&gt;
| Now: $119.99  (-20%)&lt;br /&gt;
|-&lt;br /&gt;
| You save: $60.00 on this item&lt;br /&gt;
|-&lt;br /&gt;
| Total: $239.98&lt;br /&gt;
|}&lt;br /&gt;
+--------------------------------------------------------------------------------------+&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Data Source (all on Quotation Item already) ===&lt;br /&gt;
&lt;br /&gt;
- &amp;lt;code&amp;gt;price_list_rate&amp;lt;/code&amp;gt; = $149.99 (original)&lt;br /&gt;
- &amp;lt;code&amp;gt;rate&amp;lt;/code&amp;gt; = $119.99 (after discount)&lt;br /&gt;
- &amp;lt;code&amp;gt;discount_percentage&amp;lt;/code&amp;gt; = 20%&lt;br /&gt;
- &amp;lt;code&amp;gt;amount&amp;lt;/code&amp;gt; = $239.98&lt;br /&gt;
&lt;br /&gt;
== Feature: Offer Deadline / Urgency Display ==&lt;br /&gt;
&lt;br /&gt;
=== Where Deadline Data Lives ===&lt;br /&gt;
&lt;br /&gt;
ERPNext &amp;#039;&amp;#039;&amp;#039;Pricing Rule&amp;#039;&amp;#039;&amp;#039; has these date fields:&lt;br /&gt;
&lt;br /&gt;
- &amp;lt;code&amp;gt;valid_from&amp;lt;/code&amp;gt; - Start date of the offer&lt;br /&gt;
- &amp;lt;code&amp;gt;valid_upto&amp;lt;/code&amp;gt; - End date of the offer (THIS IS THE DEADLINE)&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;pricing_rules&amp;lt;/code&amp;gt; field on each Quotation Item contains the names of applied pricing rules (JSON string).&lt;br /&gt;
&lt;br /&gt;
=== How to Surface Deadlines ===&lt;br /&gt;
&lt;br /&gt;
1. When rendering cart items, parse the &amp;lt;code&amp;gt;pricing_rules&amp;lt;/code&amp;gt; field&lt;br /&gt;
2. Look up the Pricing Rule document(s)&lt;br /&gt;
3. If &amp;lt;code&amp;gt;valid_upto&amp;lt;/code&amp;gt; exists, display it as an urgency indicator&lt;br /&gt;
&lt;br /&gt;
=== Proposed UI ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
+--------------------------------------------------------------------------------------+&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| [IMG] GPU RTX 4090                                  Qty: 1&lt;br /&gt;
|-&lt;br /&gt;
| SKU: GPU-RTX4090&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Was: $1,599.00&lt;br /&gt;
|-&lt;br /&gt;
| Now: $1,279.20  (-20%)&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [clock icon] Offer ends: March 1, 2026 (10 days left)&lt;br /&gt;
|-&lt;br /&gt;
| [tag icon]   &amp;quot;Spring GPU Sale&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Total: $1,279.20&lt;br /&gt;
|}&lt;br /&gt;
+--------------------------------------------------------------------------------------+&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Urgency Levels ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Days Remaining&lt;br /&gt;
| Display Style&lt;br /&gt;
|}&lt;br /&gt;
|---------------------|--------------------|&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt; 14 days&lt;br /&gt;
| Green text, informational&lt;br /&gt;
|-&lt;br /&gt;
| 7-14 days&lt;br /&gt;
| Yellow/orange badge: &amp;quot;Ends soon&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 1-7 days&lt;br /&gt;
| Red badge: &amp;quot;Only X days left!&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt; 24 hours&lt;br /&gt;
| Red pulsing: &amp;quot;Ends today!&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Expired&lt;br /&gt;
| Remove discount, recalculate&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Feature: Payment Summary with Savings ==&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;cart_payment_summary.html&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Subtotal (before discounts) ...... $XXX.XX  (strikethrough, muted)&lt;br /&gt;
Your Savings ..................... -$XX.XX  (green)&lt;br /&gt;
Net Total (X Items) .............. $XXX.XX&lt;br /&gt;
[Additional Discount ............. -$XX.XX] (if doc.discount_amount)&lt;br /&gt;
Tax A ............................ $XX.XX&lt;br /&gt;
Tax B ............................ $XX.XX&lt;br /&gt;
-----------------------------------------------------&lt;br /&gt;
Grand Total ...................... $XXX.XX&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Feature: Product Page Offer Display ==&lt;br /&gt;
&lt;br /&gt;
On individual product pages, show active offers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
+--------------------------------------------------------------+&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| GPU RTX 4090&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Was: $1,599.00&lt;br /&gt;
|-&lt;br /&gt;
| Now: $1,279.20&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [SPRING GPU SALE - 20% OFF]&lt;br /&gt;
|-&lt;br /&gt;
| [clock] Offer ends March 1, 2026&lt;br /&gt;
|-&lt;br /&gt;
| [bar] Only 10 days left!&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [Add to Cart]&lt;br /&gt;
|}&lt;br /&gt;
+--------------------------------------------------------------+&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sample Test Scenarios ==&lt;br /&gt;
&lt;br /&gt;
=== Scenario 1: Percentage Discount with Deadline ===&lt;br /&gt;
&lt;br /&gt;
- Product: &amp;quot;DDR5 RAM 32GB&amp;quot; at $149.99&lt;br /&gt;
- Pricing Rule: 20% off, valid_upto = March 15, 2026&lt;br /&gt;
- Cart should show: $149.99 → $119.99 (-20%), &amp;quot;Offer ends March 15&amp;quot; (24 days)&lt;br /&gt;
&lt;br /&gt;
=== Scenario 2: Coupon Code Discount ===&lt;br /&gt;
&lt;br /&gt;
- Product: &amp;quot;1TB NVMe SSD&amp;quot; at $89.99&lt;br /&gt;
- Coupon &amp;quot;SAVE15&amp;quot; for 15% off&lt;br /&gt;
- Cart should show: $89.99 → $76.49 (-15%), coupon badge&lt;br /&gt;
&lt;br /&gt;
=== Scenario 3: Free Item Promotion ===&lt;br /&gt;
&lt;br /&gt;
- Buy 2x &amp;quot;Cat6 Network Cable&amp;quot;, get 1 free&lt;br /&gt;
- Cart should show: 2x at $12.99, 1x FREE, savings = $12.99&lt;br /&gt;
&lt;br /&gt;
=== Scenario 4: Bundle/System Discount (future) ===&lt;br /&gt;
&lt;br /&gt;
- Complete server build: $2,500&lt;br /&gt;
- System builder bundle discount: 5%&lt;br /&gt;
- Cart should show: original total, -5% bundle discount, final price&lt;br /&gt;
&lt;br /&gt;
=== Scenario 5: Expiring Today ===&lt;br /&gt;
&lt;br /&gt;
- Product: &amp;quot;USB Hub&amp;quot; at $29.99&lt;br /&gt;
- Flash sale: 40% off, valid_upto = today&lt;br /&gt;
- Cart should show: $29.99 → $17.99, RED &amp;quot;Offer ends TODAY!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Scenario 6: Multiple Overlapping Offers ===&lt;br /&gt;
&lt;br /&gt;
- Product qualifies for both &amp;quot;Brand Sale 10%&amp;quot; and &amp;quot;Category Sale 15%&amp;quot;&lt;br /&gt;
- ERPNext applies the better rule (or both, depending on config)&lt;br /&gt;
- Cart should show the effective discount and list active offers&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;See Also:&amp;#039;&amp;#039;&amp;#039; [Webshop-14-Hypothesis-Discount-Deadline-Visibility Chapter 14: Hypothesis - Implementation Plan]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Navigation:&amp;#039;&amp;#039;&amp;#039; [Webshop-Index Webshop Index] | [Webshop-12-Staging-Sandbox-Deployment Previous: 12 - Staging Sandbox] | [Webshop-14-Hypothesis-Discount-Deadline-Visibility Next: 14 - Hypothesis]&lt;/div&gt;</summary>
		<author><name>Justinaquino</name></author>
	</entry>
</feed>