Register cart, order and combination extra fields in demoextrafield - #258
Open
jolelievre wants to merge 1 commit into
Open
Register cart, order and combination extra fields in demoextrafield#258jolelievre wants to merge 1 commit into
jolelievre wants to merge 1 commit into
Conversation
Companion of PrestaShop/PrestaShop#42538, one example per newly supported entity: - cart/delivery_note (COMMON — the cart is a COMMON-only entity): seeded by actionCartSave, displayed on the checkout summary (displayCheckoutSummaryTop reading {$cart.extra_properties.demoextrafield.delivery_note}), and copied onto the order at actionValidateOrder — the intended pattern for cart values that must survive checkout; - order/delivery_note (COMMON), registered with the natural entity name 'order' (the core resolves the orders table and id_order primary key), displayed on the customer's order detail page; deliberately no order-grid placement (id-first pagination limitation, core #42536); - combination/ean_verified (COMMON, exposed on the combinations API list) and combination/restock_note (SHOP), registered as 'combination' (resolved to product_attribute); - the customer extra_json field becomes the JSON showcase: the module writes a PHP structure (encoded by the core for storage) and the shared template iterates the decoded structure reads return; - README refreshed: full entity inventory, the snake_case extra_properties Smarty key (extraProperties is Admin-API-JSON-only), the COMMON-only cart caveat.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Companion of PrestaShop/PrestaShop#42538 (extra properties: non-conventional entity naming, default value typing, cart entity). Adds one example per newly supported entity and doubles as the manual-test vehicle for the core PR:
cart/delivery_note(COMMON — the cart is a COMMON-only entity, it has nocart_lang/cart_shopbase table): seeded once byactionCartSave, displayed on the checkout summary viadisplayCheckoutSummaryTopreading{$cart.extra_properties.demoextrafield.delivery_note}, and copied onto the order atactionValidateOrder— the intended pattern for cart values that must survive checkout.order/delivery_note(COMMON), registered with the natural entity nameorder(the core resolves theorderstable andid_orderprimary key), displayed on the customer's order detail page (displayOrderDetail). Deliberately no order-grid placement (id-first pagination limitation, [Extra Properties] Grid columns are silently skipped on grids using id-first pagination (order grid) PrestaShop#42536).combination/ean_verified(COMMON, exposed on the combinations Admin API list) andcombination/restock_note(SHOP), registered ascombination(resolved toproduct_attribute/id_product_attribute).extra_jsonfield becomes the JSON showcase: the module writes a PHP structure (the core encodes it for storage) and the shared template iterates the decoded structure reads return.extra_propertiesSmarty key (extraPropertiesis Admin-API-JSON-only), the COMMON-only cart caveat.Requires a core build containing PrestaShop/PrestaShop#42538.
How to test
cart,orderandcombinationentities.