update
This commit is contained in:
@@ -52,7 +52,9 @@ ignored_paths: []
|
|||||||
# Added on 2025-04-18
|
# Added on 2025-04-18
|
||||||
read_only: false
|
read_only: false
|
||||||
|
|
||||||
# list of tool names to exclude. We recommend not excluding any tools, see the readme for more details.
|
# list of tool names to exclude.
|
||||||
|
# This extends the existing exclusions (e.g. from the global configuration)
|
||||||
|
#
|
||||||
# Below is the complete list of tools for convenience.
|
# Below is the complete list of tools for convenience.
|
||||||
# To make sure you have the latest list of tools, and to view their descriptions,
|
# To make sure you have the latest list of tools, and to view their descriptions,
|
||||||
# execute `uv run scripts/print_tool_overview.py`.
|
# execute `uv run scripts/print_tool_overview.py`.
|
||||||
@@ -93,7 +95,8 @@ read_only: false
|
|||||||
# * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store.
|
# * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store.
|
||||||
excluded_tools: []
|
excluded_tools: []
|
||||||
|
|
||||||
# list of tools to include that would otherwise be disabled (particularly optional tools that are disabled by default)
|
# list of tools to include that would otherwise be disabled (particularly optional tools that are disabled by default).
|
||||||
|
# This extends the existing inclusions (e.g. from the global configuration).
|
||||||
included_optional_tools: []
|
included_optional_tools: []
|
||||||
|
|
||||||
# fixed set of tools to use as the base tool set (if non-empty), replacing Serena's default set of tools.
|
# fixed set of tools to use as the base tool set (if non-empty), replacing Serena's default set of tools.
|
||||||
@@ -124,3 +127,26 @@ initial_prompt: ""
|
|||||||
# This overrides the corresponding setting in the global configuration; see the documentation there.
|
# This overrides the corresponding setting in the global configuration; see the documentation there.
|
||||||
# If null or missing, use the setting from the global configuration.
|
# If null or missing, use the setting from the global configuration.
|
||||||
symbol_info_budget:
|
symbol_info_budget:
|
||||||
|
|
||||||
|
# line ending convention to use when writing source files.
|
||||||
|
# Possible values: unset (use global setting), "lf", "crlf", or "native" (platform default)
|
||||||
|
# This does not affect Serena's own files (e.g. memories and configuration files), which always use native line endings.
|
||||||
|
line_ending:
|
||||||
|
|
||||||
|
# list of regex patterns which, when matched, mark a memory entry as read‑only.
|
||||||
|
# Extends the list from the global configuration, merging the two lists.
|
||||||
|
read_only_memory_patterns: []
|
||||||
|
|
||||||
|
# list of regex patterns for memories to completely ignore.
|
||||||
|
# Matching memories will not appear in list_memories or activate_project output
|
||||||
|
# and cannot be accessed via read_memory or write_memory.
|
||||||
|
# To access ignored memory files, use the read_file tool on the raw file path.
|
||||||
|
# Extends the list from the global configuration, merging the two lists.
|
||||||
|
# Example: ["_archive/.*", "_episodes/.*"]
|
||||||
|
ignored_memory_patterns: []
|
||||||
|
|
||||||
|
# advanced configuration option allowing to configure language server-specific options.
|
||||||
|
# Maps the language key to the options.
|
||||||
|
# Have a look at the docstring of the constructors of the LS implementations within solidlsp (e.g., for C# or PHP) to see which options are available.
|
||||||
|
# No documentation on options means no options are available.
|
||||||
|
ls_specific_settings: {}
|
||||||
|
|||||||
2
.vscode/ftp-kr.json
vendored
2
.vscode/ftp-kr.json
vendored
@@ -6,7 +6,7 @@
|
|||||||
"protocol": "ftp",
|
"protocol": "ftp",
|
||||||
"port": 0,
|
"port": 0,
|
||||||
"fileNameEncoding": "utf8",
|
"fileNameEncoding": "utf8",
|
||||||
"autoUpload": false,
|
"autoUpload": true,
|
||||||
"autoDelete": false,
|
"autoDelete": false,
|
||||||
"autoDownload": false,
|
"autoDownload": false,
|
||||||
"ignoreRemoteModification": true,
|
"ignoreRemoteModification": true,
|
||||||
|
|||||||
2
.vscode/sftp.json
vendored
2
.vscode/sftp.json
vendored
@@ -6,7 +6,7 @@
|
|||||||
"username": "www@marianek.pl",
|
"username": "www@marianek.pl",
|
||||||
"password": "7rtNLvttUf8mRhthuPQ5",
|
"password": "7rtNLvttUf8mRhthuPQ5",
|
||||||
"remotePath": "/public_html",
|
"remotePath": "/public_html",
|
||||||
"uploadOnSave": true,
|
"uploadOnSave": false,
|
||||||
"useTempFile": false,
|
"useTempFile": false,
|
||||||
"openSsh": false,
|
"openSsh": false,
|
||||||
"ignore": [
|
"ignore": [
|
||||||
|
|||||||
@@ -8,26 +8,24 @@ $text = \front\Views\Articles::generateHeadersIds( $text );
|
|||||||
$this -> article['language']['seo_link'] ? $url = $this -> article['language']['seo_link'] : $url = 'a-' . $this -> article['id'] . '-' . \Shared\Helpers\Helpers::seo( $this -> article['language']['title'] );
|
$this -> article['language']['seo_link'] ? $url = $this -> article['language']['seo_link'] : $url = 'a-' . $this -> article['id'] . '-' . \Shared\Helpers\Helpers::seo( $this -> article['language']['title'] );
|
||||||
|
|
||||||
if ( $this -> article['show_title'] )
|
if ( $this -> article['show_title'] )
|
||||||
echo '<h3 class="article-title">' . htmlspecialchars( $this -> article['language']['title'], ENT_QUOTES, 'UTF-8' ) . '</h3>';
|
echo '<h3 class="article-title">' . $this -> article['language']['title'] . '</h3>';
|
||||||
|
|
||||||
if ( $this -> article['social_icons'] ):
|
if ( $this -> article['social_icons'] ):
|
||||||
$safeHost = htmlspecialchars( $_SERVER['SERVER_NAME'], ENT_QUOTES, 'UTF-8' );
|
|
||||||
$safeUrl = htmlspecialchars( $url, ENT_QUOTES, 'UTF-8' );
|
|
||||||
?>
|
?>
|
||||||
<div class="social-icons">
|
<div class="social-icons">
|
||||||
<a class="fb" href="http://www.facebook.com/sharer.php?u=http://www.<?= $safeHost;?>/<?= $safeUrl;?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" title="facebook" target="_blank" rel="nofollow">
|
<a class="fb" href="http://www.facebook.com/sharer.php?u=http://www.<?= $_SERVER['SERVER_NAME'];?>/<?= $url;?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" title="facebook" target="_blank" rel="nofollow">
|
||||||
<img src="/images/system/logo-facebook.jpg" alt="facebook">
|
<img src="/images/system/logo-facebook.jpg" alt="facebook">
|
||||||
</a>
|
</a>
|
||||||
<a class="pinterest" href="http://pinterest.com/pin/create/button/?url=http://www.<?= $safeHost;?>/<?= $safeUrl;?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" title="pinterest" target="_blank" rel="nofollow">
|
<a class="pinterest" href="http://pinterest.com/pin/create/button/?url=http://www.<?= $_SERVER['SERVER_NAME'];?>/<?= $url;?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" title="pinterest" target="_blank" rel="nofollow">
|
||||||
<img src="/images/system/logo-pinterest.jpg" alt="pinterest">
|
<img src="/images/system/logo-pinterest.jpg" alt="pinterest">
|
||||||
</a>
|
</a>
|
||||||
<a class="twitter" href="http://twitter.com/share?url=http://www.<?= $safeHost;?>/<?= $safeUrl;?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=450,width=600');return false;" title="twitter" target="_blank" rel="nofollow">
|
<a class="twitter" href="http://twitter.com/share?url=http://www.<?= $_SERVER['SERVER_NAME'];?>/<?= $url;?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=450,width=600');return false;" title="twitter" target="_blank" rel="nofollow">
|
||||||
<img src="/images/system/logo-twitter.jpg" alt="twitter">
|
<img src="/images/system/logo-twitter.jpg" alt="twitter">
|
||||||
</a>
|
</a>
|
||||||
<a class="linkedin" href="http://www.linkedin.com/shareArticle?mini=true&url=http://www.<?= $safeHost;?>/<?= $safeUrl;?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=500,width=850');return false;" title="linked in" target="_blank" rel="nofollow">
|
<a class="linkedin" href="http://www.linkedin.com/shareArticle?mini=true&url=http://www.<?= $_SERVER['SERVER_NAME'];?>/<?= $url;?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=500,width=850');return false;" title="linked in" target="_blank" rel="nofollow">
|
||||||
<img src="/images/system/logo-linkedin.jpg" alt="linkedin">
|
<img src="/images/system/logo-linkedin.jpg" alt="linkedin">
|
||||||
</a>
|
</a>
|
||||||
<a class="gp" href="https://plus.google.com/share?url=http://www.<?= $safeHost;?>/<?= $safeUrl;?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" title="google+" target="_blank" rel="nofollow">
|
<a class="gp" href="https://plus.google.com/share?url=http://www.<?= $_SERVER['SERVER_NAME'];?>/<?= $url;?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" title="google+" target="_blank" rel="nofollow">
|
||||||
<img src="/images/system/logo-google.jpg" alt="google+">
|
<img src="/images/system/logo-google.jpg" alt="google+">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,52 +1,15 @@
|
|||||||
<? if ( $this -> custom_fields ) : ?>
|
<? if ( $this -> custom_fields ): foreach ( $this -> custom_fields as $key => $val ):?>
|
||||||
<div class="custom-fields-display" data-product-code="<?= htmlspecialchars( $this->product_code ); ?>">
|
<? if ( $key ):?>
|
||||||
<? foreach ( $this -> custom_fields as $key => $val ) : ?>
|
<div class="custom-field">
|
||||||
<? $custom_field = ( new \Domain\Product\ProductRepository( $GLOBALS['mdb'] ) )->findCustomFieldCached( $key ); ?>
|
<div class="_name">
|
||||||
<? $field_type = !empty( $custom_field['type'] ) ? $custom_field['type'] : 'text'; ?>
|
<?
|
||||||
|
$custom_field = ( new \Domain\Product\ProductRepository( $GLOBALS['mdb'] ) )->findCustomFieldCached( $key );
|
||||||
<? if ( $field_type == 'text' ) : ?>
|
echo $custom_field['name'] . ':';
|
||||||
<div class="custom-field">
|
?>
|
||||||
<div class="_name">
|
</div>
|
||||||
<?= htmlspecialchars( $custom_field['name'] ) . ':'; ?>
|
<div class="_text">
|
||||||
</div>
|
<?= $val;?>
|
||||||
<div class="_text">
|
|
||||||
<?= nl2br( htmlspecialchars( $val ) );?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<? elseif ( $field_type == 'image' && !empty( $val ) ) : ?>
|
|
||||||
<div class="custom-field">
|
|
||||||
<div class="_name">
|
|
||||||
<?= htmlspecialchars( $custom_field['name'] ) . ':'; ?>
|
|
||||||
</div>
|
|
||||||
<div class="_image">
|
|
||||||
<img src="<?= htmlspecialchars( $val );?>" alt="<?= htmlspecialchars( $custom_field['name'] );?>">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<? endif; ?>
|
|
||||||
<? endforeach; ?>
|
|
||||||
<a href="#" class="btn btn-sm btn-default btn-edit-custom-fields">Edytuj personalizację</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="custom-fields-edit" data-product-code="<?= htmlspecialchars( $this->product_code ); ?>" style="display: none;">
|
|
||||||
<? foreach ( $this -> custom_fields as $key => $val ) : ?>
|
|
||||||
<? $custom_field = ( new \Domain\Product\ProductRepository( $GLOBALS['mdb'] ) )->findCustomFieldCached( $key ); ?>
|
|
||||||
<? $field_type = !empty( $custom_field['type'] ) ? $custom_field['type'] : 'text'; ?>
|
|
||||||
<? $is_required = !empty( $custom_field['is_required'] ) ? (int)$custom_field['is_required'] : 0; ?>
|
|
||||||
|
|
||||||
<div class="custom-field-edit-row" style="margin-bottom: 5px;">
|
|
||||||
<label>
|
|
||||||
<?= htmlspecialchars( $custom_field['name'] ); ?><?= $is_required ? ' <span style="color:red;">*</span>' : ''; ?>
|
|
||||||
</label>
|
|
||||||
<? if ( $field_type == 'text' ) : ?>
|
|
||||||
<input type="text" class="form-control form-control-sm" name="custom_field[<?= (int)$key; ?>]" value="<?= htmlspecialchars( $val ); ?>" <?= $is_required ? 'required' : ''; ?>>
|
|
||||||
<? elseif ( $field_type == 'image' ) : ?>
|
|
||||||
<input type="text" class="form-control form-control-sm" name="custom_field[<?= (int)$key; ?>]" value="<?= htmlspecialchars( $val ); ?>" placeholder="URL obrazka" <?= $is_required ? 'required' : ''; ?>>
|
|
||||||
<? endif; ?>
|
|
||||||
</div>
|
</div>
|
||||||
<? endforeach; ?>
|
|
||||||
<div style="margin-top: 5px;">
|
|
||||||
<a href="#" class="btn btn-sm btn-primary btn-save-custom-fields">Zapisz</a>
|
|
||||||
<a href="#" class="btn btn-sm btn-default btn-cancel-custom-fields">Anuluj</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<? endif;?>
|
||||||
<? endif; ?>
|
<? endforeach; endif;?>
|
||||||
|
|||||||
@@ -57,8 +57,7 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<? endif; ?>
|
<? endif; ?>
|
||||||
<?= \Shared\Tpl\Tpl::view( 'shop-basket/_partials/product-custom-fields', [
|
<?= \Shared\Tpl\Tpl::view( 'shop-basket/_partials/product-custom-fields', [
|
||||||
'custom_fields' => $position['custom_fields'],
|
'custom_fields' => $position['custom_fields']
|
||||||
'product_code' => $position_hash
|
|
||||||
] ); ?>
|
] ); ?>
|
||||||
<? if ( $product['additional_message'] ):?>
|
<? if ( $product['additional_message'] ):?>
|
||||||
<div class="basket-product-message">
|
<div class="basket-product-message">
|
||||||
|
|||||||
@@ -1,46 +1,4 @@
|
|||||||
<? global $settings; ?>
|
<? global $settings; ?>
|
||||||
<?
|
|
||||||
if ( $settings['google_tag_manager_id'] && is_array( $this -> basket ) && count( $this -> basket ) ):
|
|
||||||
$view_cart_items = '';
|
|
||||||
$view_cart_value = 0;
|
|
||||||
|
|
||||||
foreach ( $this -> basket as $position ):
|
|
||||||
$vc_product = (new \Domain\Product\ProductRepository($GLOBALS['mdb']))->findCached( (int)$position['product-id'], (new \Domain\Languages\LanguagesRepository($GLOBALS['mdb']))->defaultLanguage() );
|
|
||||||
|
|
||||||
if ( !$vc_product )
|
|
||||||
continue;
|
|
||||||
|
|
||||||
$vc_price = (float)$vc_product['price_brutto_promo'] > 0 && (float)$vc_product['price_brutto_promo'] < (float)$vc_product['price_brutto']
|
|
||||||
? (float)$vc_product['price_brutto_promo']
|
|
||||||
: (float)$vc_product['price_brutto'];
|
|
||||||
|
|
||||||
$vc_qty = (int)$position['quantity'];
|
|
||||||
$view_cart_value += $vc_price * $vc_qty;
|
|
||||||
|
|
||||||
if ( $view_cart_items )
|
|
||||||
$view_cart_items .= ',';
|
|
||||||
|
|
||||||
$view_cart_items .= '{';
|
|
||||||
$view_cart_items .= 'item_id: "' . $vc_product['id'] . '",';
|
|
||||||
$view_cart_items .= 'item_name: "' . str_replace( '"', '', $vc_product['language']['name'] ) . '",';
|
|
||||||
$view_cart_items .= 'price: ' . \Shared\Helpers\Helpers::normalize_decimal( $vc_price ) . ',';
|
|
||||||
$view_cart_items .= 'quantity: ' . $vc_qty . ',';
|
|
||||||
$view_cart_items .= 'google_business_vertical: "retail"';
|
|
||||||
$view_cart_items .= '}';
|
|
||||||
endforeach;
|
|
||||||
?>
|
|
||||||
<script type="text/javascript">
|
|
||||||
dataLayer.push({ ecommerce: null });
|
|
||||||
dataLayer.push({
|
|
||||||
event: "view_cart",
|
|
||||||
ecommerce: {
|
|
||||||
currency: "PLN",
|
|
||||||
value: <?= \Shared\Helpers\Helpers::normalize_decimal( $view_cart_value );?>,
|
|
||||||
items: [<?= $view_cart_items;?>]
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<? endif; ?>
|
|
||||||
<div id="basket-container">
|
<div id="basket-container">
|
||||||
<div id="content">
|
<div id="content">
|
||||||
<?= $this->basket_details; ?>
|
<?= $this->basket_details; ?>
|
||||||
@@ -553,62 +511,4 @@
|
|||||||
console.warn('#orlen_point_id nie został znaleziony.');
|
console.warn('#orlen_point_id nie został znaleziony.');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
</script>
|
||||||
// edycja personalizacji produktu w koszyku
|
|
||||||
$(document).on('click', '.btn-edit-custom-fields', function(e) {
|
|
||||||
e.preventDefault();
|
|
||||||
var $display = $(this).closest('.custom-fields-display');
|
|
||||||
var productCode = $display.data('product-code');
|
|
||||||
$display.hide();
|
|
||||||
$display.siblings('.custom-fields-edit[data-product-code="' + productCode + '"]').show();
|
|
||||||
});
|
|
||||||
|
|
||||||
$(document).on('click', '.btn-cancel-custom-fields', function(e) {
|
|
||||||
e.preventDefault();
|
|
||||||
var $edit = $(this).closest('.custom-fields-edit');
|
|
||||||
var productCode = $edit.data('product-code');
|
|
||||||
$edit.hide();
|
|
||||||
$edit.siblings('.custom-fields-display[data-product-code="' + productCode + '"]').show();
|
|
||||||
});
|
|
||||||
|
|
||||||
$(document).on('click', '.btn-save-custom-fields', function(e) {
|
|
||||||
e.preventDefault();
|
|
||||||
var $edit = $(this).closest('.custom-fields-edit');
|
|
||||||
var productCode = $edit.data('product-code');
|
|
||||||
|
|
||||||
var valid = true;
|
|
||||||
$edit.find('input[required]').each(function() {
|
|
||||||
if ($.trim($(this).val()) === '') {
|
|
||||||
$(this).css('border-color', 'red');
|
|
||||||
valid = false;
|
|
||||||
} else {
|
|
||||||
$(this).css('border-color', '');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!valid) {
|
|
||||||
alert('Wypełnij wszystkie wymagane pola');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var formData = { product_code: productCode };
|
|
||||||
$edit.find('input[name^="custom_field"]').each(function() {
|
|
||||||
formData[$(this).attr('name')] = $(this).val();
|
|
||||||
});
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
type: 'POST',
|
|
||||||
cache: false,
|
|
||||||
url: '/shopBasket/basket_update_custom_fields',
|
|
||||||
data: formData,
|
|
||||||
success: function(response) {
|
|
||||||
var data = jQuery.parseJSON(response);
|
|
||||||
if (data.result === 'ok') {
|
|
||||||
location.reload();
|
|
||||||
} else {
|
|
||||||
alert(data.message || 'Wystąpił błąd');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@@ -73,11 +73,10 @@
|
|||||||
$begin_checkout_items .= ',';
|
$begin_checkout_items .= ',';
|
||||||
|
|
||||||
$begin_checkout_items .= '{';
|
$begin_checkout_items .= '{';
|
||||||
$begin_checkout_items .= '"item_id": "' . $product['id'] . '",';
|
$begin_checkout_items .= '"id": "' . $product['id'] . '",';
|
||||||
$begin_checkout_items .= '"item_name": "' . str_replace( '"', '', $product['language']['name'] ) . '",';
|
$begin_checkout_items .= '"name": "' . $product['language']['name'] . '",';
|
||||||
$begin_checkout_items .= '"price": ' . \Shared\Helpers\Helpers::normalize_decimal( $price_product['price_new'] ) . ',';
|
$begin_checkout_items .= '"price": ' . \Shared\Helpers\Helpers::normalize_decimal( $price_product['price_new'] ) . ',';
|
||||||
$begin_checkout_items .= '"quantity": ' . (int)$position['quantity'] . ',';
|
$begin_checkout_items .= '"quantity": ' . $position['quantity'];
|
||||||
$begin_checkout_items .= '"google_business_vertical": "retail"';
|
|
||||||
$begin_checkout_items .= '}';
|
$begin_checkout_items .= '}';
|
||||||
?>
|
?>
|
||||||
<? endforeach;?>
|
<? endforeach;?>
|
||||||
@@ -153,22 +152,18 @@
|
|||||||
<? endif;?>
|
<? endif;?>
|
||||||
</div>
|
</div>
|
||||||
<script class="footer" type="text/javascript">
|
<script class="footer" type="text/javascript">
|
||||||
var orderForm = document.getElementById('form-order');
|
document.getElementById('order-send').addEventListener('click', function() {
|
||||||
var orderSendButton = document.getElementById('order-send');
|
var form = document.getElementById('form-order'); // Zastąp 'form-id' rzeczywistym ID Twojego formularza
|
||||||
|
if (form.checkValidity()) {
|
||||||
if (orderForm && orderSendButton) {
|
this.classList.add('loading-button');
|
||||||
orderForm.addEventListener('submit', function(event) {
|
this.disabled = true;
|
||||||
if (orderSendButton.disabled) {
|
form.submit();
|
||||||
event.preventDefault();
|
} else {
|
||||||
return;
|
// Opcjonalnie: wywołaj funkcję reportValidity(), aby wyświetlić komunikaty o błędach formularza
|
||||||
}
|
form.reportValidity();
|
||||||
|
}
|
||||||
orderSendButton.classList.add('loading-button');
|
});
|
||||||
orderSendButton.disabled = true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
<? if ( $this -> settings['google_tag_manager_id'] ):?>
|
<? if ( $this -> settings['google_tag_manager_id'] ):?>
|
||||||
dataLayer.push({ ecommerce: null });
|
|
||||||
dataLayer.push({
|
dataLayer.push({
|
||||||
event: "begin_checkout",
|
event: "begin_checkout",
|
||||||
ecommerce: {
|
ecommerce: {
|
||||||
|
|||||||
@@ -177,10 +177,10 @@
|
|||||||
items: [
|
items: [
|
||||||
<? foreach ( $this -> order['products'] as $product ):?>
|
<? foreach ( $this -> order['products'] as $product ):?>
|
||||||
{
|
{
|
||||||
item_id: "<?= $product['product_id'];?>",
|
id: <?= (int)$product['product_id'];?>,
|
||||||
item_name: "<?= str_replace( '"', '', $product['name'] );?>",
|
name: '<?= $product['name'];?>',
|
||||||
quantity: <?= (int)$product['quantity'];?>,
|
quantity: <?= $product['quantity'];?>,
|
||||||
price: <?= ((float)$product['price_brutto_promo'] > 0 && (float)$product['price_brutto_promo'] < (float)$product['price_brutto']) ? \Shared\Helpers\Helpers::normalize_decimal( $product['price_brutto_promo'] ) : \Shared\Helpers\Helpers::normalize_decimal( $product['price_brutto'] );?>,
|
price: <?= $product['price_brutto_promo'];?>,
|
||||||
google_business_vertical: "retail"
|
google_business_vertical: "retail"
|
||||||
}<? if ( $product != end( $this -> order['products'] ) ) echo ',';?>
|
}<? if ( $product != end( $this -> order['products'] ) ) echo ',';?>
|
||||||
<? endforeach;?>
|
<? endforeach;?>
|
||||||
@@ -188,7 +188,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
<? endif;?>
|
<? endif;?>
|
||||||
<? unset( $_SESSION['google-analytics-purchase'] );?>
|
<? unset( $_SESSION['google-adwords-purchase'] );?>
|
||||||
<? endif;?>
|
<? endif;?>
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -294,13 +294,11 @@
|
|||||||
dataLayer.push({
|
dataLayer.push({
|
||||||
event: "view_item",
|
event: "view_item",
|
||||||
ecommerce: {
|
ecommerce: {
|
||||||
currency: "PLN",
|
|
||||||
value: <? if ( $this -> product['price_brutto_promo'] ): echo \Shared\Helpers\Helpers::normalize_decimal( $this -> product['price_brutto_promo'] ); else: echo \Shared\Helpers\Helpers::normalize_decimal( $this -> product['price_brutto'] ); endif;?>,
|
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
item_id: "<?= $this -> product['id'];?>",
|
item_id: "<?= $this -> product['id'];?>",
|
||||||
item_name: "<?= str_replace( '"', '', $this -> product['language']['name'] );?>",
|
item_name: "<?= str_replace( '"', '', $this -> product['language']['name'] );?>",
|
||||||
price: <? if ( $this -> product['price_brutto_promo'] ): echo \Shared\Helpers\Helpers::normalize_decimal( $this -> product['price_brutto_promo'] ); else: echo \Shared\Helpers\Helpers::normalize_decimal( $this -> product['price_brutto'] ); endif;?>,
|
price: '<? if ( $this -> product['price_brutto_promo'] ): echo \Shared\Helpers\Helpers::normalize_decimal( $this -> product['price_brutto_promo'] ); else: echo \Shared\Helpers\Helpers::normalize_decimal( $this -> product['price_brutto'] ); endif;?>',
|
||||||
quantity: 1,
|
quantity: 1,
|
||||||
google_business_vertical: "retail"
|
google_business_vertical: "retail"
|
||||||
}
|
}
|
||||||
@@ -635,7 +633,7 @@
|
|||||||
item_id: "<?= $this -> product['id'];?>",
|
item_id: "<?= $this -> product['id'];?>",
|
||||||
item_name: "<?= str_replace( '"', '', $this -> product['language']['name'] );?>",
|
item_name: "<?= str_replace( '"', '', $this -> product['language']['name'] );?>",
|
||||||
price: <? if ( $this -> product['price_brutto_promo'] ): echo \Shared\Helpers\Helpers::normalize_decimal( $this -> product['price_brutto_promo'] ); else: echo \Shared\Helpers\Helpers::normalize_decimal( $this -> product['price_brutto'] ); endif;?>,
|
price: <? if ( $this -> product['price_brutto_promo'] ): echo \Shared\Helpers\Helpers::normalize_decimal( $this -> product['price_brutto_promo'] ); else: echo \Shared\Helpers\Helpers::normalize_decimal( $this -> product['price_brutto'] ); endif;?>,
|
||||||
quantity: parseInt(quantity),
|
quantity: quantity,
|
||||||
google_business_vertical: "retail"
|
google_business_vertical: "retail"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user