diff --git a/make_post_sell/static/css/common.css b/make_post_sell/static/css/common.css index 378c156..48f086b 100644 --- a/make_post_sell/static/css/common.css +++ b/make_post_sell/static/css/common.css @@ -1574,6 +1574,19 @@ div.edit-page > section.edit-card-full { grid-column: 1 / -1; } +/* Render order on the edit page (CSS order property reorders without + changing HTML source order): + 1. Edit Title, Description, or Visibility (full width, top) + 2. Upload Product File (left column) + 3. Upload Preview File (right column, sibling of Upload Product) + 4. Upload Thumbnails (full width) + 5. Price History (whatever comes last) */ +div.edit-page > section.product-title-and-description { order: 1; } +div.edit-page > section.upload-product-and-preview { order: 2; } +div.edit-page > section.upload-preview { order: 3; } +div.edit-page > section.upload-thumbnails { order: 4; } +div.edit-page > section.price-history { order: 5; } + /* Thumbnails header laid out via .upload-thumbnails-header flex row above the .upload-thumbnails-grid (see below). */ diff --git a/make_post_sell/templates/product_edit.j2 b/make_post_sell/templates/product_edit.j2 index f3cd8e2..5da01e2 100644 --- a/make_post_sell/templates/product_edit.j2 +++ b/make_post_sell/templates/product_edit.j2 @@ -147,19 +147,19 @@ - {% if product.is_sellable %} + {% endif %} -
+ +{# Preview file: its own card, sits in the right column of the edit grid. #} +{% if not product.is_bundle and not product.is_physical and product.is_sellable %} +

📺 Upload or Replace Preview File

- People may download this file before making a purchase. - -
-
+

People may download this file before making a purchase.

{% if "preview" in product.originals %}

Current File: {{ product.originals["preview"] }}

@@ -191,11 +191,8 @@
- - {% endif %} - {% endif %} -
+{% endif %}
diff --git a/make_post_sell/views/product.py b/make_post_sell/views/product.py index 5357638..7c72a74 100644 --- a/make_post_sell/views/product.py +++ b/make_post_sell/views/product.py @@ -314,6 +314,7 @@ def product_edit(request): # MPS-20 + MPS-21: pricing_mode + allow_offers (per-product overrides). if "submit" in request.params: # TEMPORARY DEBUG: log raw POST params for pricing_mode investigation. + # Writes to /tmp/mps-pricing-debug.log so we can read without sudo. # Remove once the save defect is diagnosed. try: import logging as _logging @@ -329,6 +330,19 @@ def product_edit(request): ) except Exception: pass + try: + import time as _time + with open("/tmp/mps-pricing-debug.log", "a") as _f: + _f.write( + f"{_time.time():.3f} product={product.uuid_str} " + f"current={product.pricing_mode} " + f"pricing_mode={request.params.get('pricing_mode')!r} " + f"all_modes={list(request.params.getall('pricing_mode')) if hasattr(request.params, 'getall') else 'no-getall'} " + f"submit={request.params.get('submit')!r} " + f"all_keys={sorted(request.params.keys())}\n" + ) + except Exception: + pass try: new_mode = int(request.params.get("pricing_mode", product.pricing_mode)) except (TypeError, ValueError):