// === information.php controller patch (OpenCart 4.x) === // Goal: set About Us meta + canonical; expose OG/Twitter vars to header.twig; remove duplicate H1 via template change only. // 1) Ensure canonical uses the Document links API (header.twig already renders {{ links }}) $this->document->addLink( $this->url->link('information/information', 'information_id=' . (int)$information_id, true), 'canonical' ); // 2) (Optional) If this is the About Us page, set bespoke title & meta description // Replace {ABOUT_ID} with your About page information_id from Admin > Design > Information if ((int)$information_id === {ABOUT_ID}) { $this->document->setTitle('About Us | Popper Express Australia'); $this->document->setDescription('Learn about Popper Express Australia — Melbourne-based since 2007. Authentic brands, fast discreet shipping, and customer-first support across Australia.'); // 3) Pass dynamic OG/Twitter variables to header.twig (with sensible fallbacks) $data['og_url'] = $this->url->link('information/information', 'information_id=' . (int)$information_id, true); $data['og_title'] = $this->document->getTitle(); $data['og_description'] = $this->document->getDescription(); // Optionally choose a branded image $data['og_image'] = $this->config->get('config_logo') ? ($this->config->get('config_secure') ? HTTPS_SERVER : HTTP_SERVER) . 'image/catalog/share/og-home.jpg' : ''; $data['og_image_alt'] = 'Popper Express Australia'; $data['twitter_title'] = $data['og_title']; $data['twitter_description'] = $data['og_description']; $data['twitter_image'] = $data['og_image']; } // 4) Clear theme and modification caches after deploying header.twig + information.twig changes.