Skip to content

Commit 4beb072

Browse files
asavaleAmeya Savale
andauthored
Customize product content id incorrect (#751)
* prevent validations for testing purposes * populate address information if it is missing * update comments * logging * convert type to product group * re-enable rsa and totals validation * remove logging lines --------- Co-authored-by: Ameya Savale <[email protected]>
1 parent 49210e0 commit 4beb072

File tree

2 files changed

+12
-17
lines changed

2 files changed

+12
-17
lines changed

app/code/Meta/BusinessExtension/Model/Api/CustomApiKey/Authenticator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ class Authenticator
5252
* Authenticator constructor
5353
*
5454
* @param ScopeConfigInterface $scopeConfig
55-
* @param Http $httpRequest
56-
* @param SystemConfig $systemConfig
57-
* @param FBEHelper $fbeHelper
55+
* @param Http $httpRequest
56+
* @param SystemConfig $systemConfig
57+
* @param FBEHelper $fbeHelper
5858
*/
5959
public function __construct(
6060
ScopeConfigInterface $scopeConfig,

app/code/Meta/Conversion/view/frontend/web/js/customizeProduct.js

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,39 +8,36 @@ define([
88

99
return function (config) {
1010

11-
function callMetaPixelTracker()
12-
{
11+
function callMetaPixelTracker() {
1312
if (config !== null) {
1413
// browser event payload
1514
config.browserEventData.payload.content_name = payload.productName;
1615
config.browserEventData.payload.content_ids = [payload.sku];
17-
config.browserEventData.payload.content_type = 'product';
16+
config.browserEventData.payload.content_type = 'product_group';
1817

1918
// server event payload
2019
config.payload.content_name = payload.productName;
2120
config.payload.content_ids = [payload.sku];
22-
config.payload.content_type = 'product';
21+
config.payload.content_type = 'product_group';
2322

2423
metaPixelTracker(config);
2524
}
2625
}
2726

28-
function _getPrice(element)
29-
{
27+
function _getPrice(element) {
3028
// For Swatch and Text Type - PLP page
3129
productId = $(element).parents('.product-item-details').find('.price-final_price').data('product-id');
32-
price = $('#old-price-' + productId + '-widget-product-grid') . data('price-amount');
30+
price = $('#old-price-' + productId + '-widget-product-grid').data('price-amount');
3331

3432
// for DropdownType, Swatch and Text Type - PDP page
3533
if (!price) {
3634
productId = $(element).parents('.product-info-main').find('.price-final_price').data('product-id');
37-
price = $('#product-price-' + productId) . data('price-amount');
35+
price = $('#product-price-' + productId).data('price-amount');
3836
}
3937
return price;
4038
}
4139

42-
function _getProductName(element)
43-
{
40+
function _getProductName(element) {
4441
// For Swatch and Text Type - PLP page
4542
productName = $(element).parents('.product-item-details').find('.product-item-link').text();
4643
productName = productName.trim();
@@ -52,8 +49,7 @@ define([
5249
return productName;
5350
}
5451

55-
function _getSku(element)
56-
{
52+
function _getSku(element) {
5753
// For Swatch and Text Type - PLP page
5854
sku = $(element).parents('li.product-item').find('form').data('product-sku');
5955
// for Swatch and Text Type - PDP page
@@ -64,8 +60,7 @@ define([
6460
return sku;
6561
}
6662

67-
function setPayload(element)
68-
{
63+
function setPayload(element) {
6964
payload = {
7065
'productName': _getProductName(element),
7166
'sku': _getSku(element)

0 commit comments

Comments
 (0)