Totally Zenned
- Join Date:
- Jan 2004
- Location:
- N of San Antonio TX
- Posts:
- 9,809
- Plugin Contributions:
- 15
Preview Email
Scott — thanks for the concrete example; that pins it down.
I checked every Zen Cart from 1.5.7 through 3.0.0, and stock core builds the confirmation-email line as qty x name (model) = price in all of them (in order::create_add_products(), the products_ordered / products_ordered_html build). None put the model first. So 1 x WHS0059 Baby's Breath - Excellence, 250gm Bunch $15.00 — model first, no parentheses, no = — isn't what stock Zen Cart sends; something on your store is reformatting that line. The preview is showing the stock format, which is what a preview rebuilt from order.php can show.
I also checked the common mods that touch orders, in case one of them was rewriting it, and came up empty: One Page Checkout uses the stock order class as-is (it just calls new order() from core, ships no order.php, and never touches the email), and Edit Orders doesn't rebuild the confirmation line at all — its only model formatting is [model] in the change log, not model name. So it isn't one of those; it looks specific to your store. My hunch is a customization on the Portland florist's site changed how its order-confirmation email builds the product line, rather than anything in core — does that match what you've got there?
And here's where your original point lands, fairly: a preview that reproduces core's markup reflects stock Zen Cart, not whatever a given store has changed. That's true of ours, and it was equally true of the 1.x/2.x line — build_checkout_email() hardcoded name (model) as well, so it would show the same stock format on your store, not your model name. Neither approach can mirror a store-side change to the email by copying core.
So the useful question is where your store changes it, because that decides what's possible:
- If it's an edit to includes/classes/order.php (its products_ordered line), we can make the preview read the store's own order.php and render from that, so a customized line shows through. That's the "don't just copy core" direction you've been pointing at.
- If it's a plugin or a notifier reformatting the email as it's sent, then order.php is stock and the change lives only at send time — nothing that inspects a stored order can reproduce it; only an actual send would.
Quickest way to tell which: v3.0.2 ships tests/Unit/CheckoutParityTest.php, which checks the preview against your store's own order.php. If it passes on your store, the change is at send time; if it fails, it's in order.php and we've got a clear target. Or just tell me what's reformatting that line.
Either way, I want to make this right for your case — I just need to know which it is.
A little help with colors.
myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.