Write restriction notices and link each notice to the product codes that must show it.
This screen keeps the product restriction notices used on the store. Each notice is saved with its wording, then linked to one or more product codes. The list is short and curated, so every notice appears on this page. Saving, editing, deleting, and product-link changes are written through parameterized database helpers.
pd_restrictions ordered by description, pd_restrictions_product for linked models, and oc_product.model when a product code is added.pd_restrictions.description and pd_restrictions.sort_order on save. pd_restrictions_product receives the restriction id, product id, and model. Deletes remove the notice row or the selected product link.InsertRecord(), UpdateTable(), and DeleteTable() inside a transaction. A new notice is created only when the save control posts 0. Product links are matched by restriction id and product id so a repeat add updates the same link. Delete asks for confirmation. Failures are written with error_log() and shown in the page alert. Navigation stays on. The full list stays on one page.