Hello,
I was wondering how to add the product id to ht_schema and ht_opengraph mainly for Facebook Pixel?
It's for a 1.0.8.4 shop.
If you need more info, let me know.
I thought it was as simple as adding 'id' => $product_info['products_id'], to ht_schema.php but obviously some supporting code is needed.
Thank you.
Add product_id to Schema and Opengraph for Pixels?
- burt
- Core Team
- Posts: 4551
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 412 times
Re: Add product_id to Schema and Opengraph for Pixels?
These instructions are for Phoenix 1.0.8.19 and blow.
These instructions are not for 1.0.8.20 onwards, where you can do all this with a hook.
1.0.8.19 and below
For schema I believe it is productID, so;
placed just above
--
For opengraph I believe it is product:retailer_item_id, so;
placed just above
$result = '';
These instructions are not for 1.0.8.20 onwards, where you can do all this with a hook.
1.0.8.19 and below
For schema I believe it is productID, so;
Code: Select all
$schema_product['productID'] = (int)$product_info['products_id'];Code: Select all
$data = json_encode($schema_product);--
For opengraph I believe it is product:retailer_item_id, so;
Code: Select all
$data['product:retailer_item_id'] = (int)$product->get('id');$result = '';
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.