https://www.php.net/manual/en/timezones.php
Fine timezone name for a country
https://www.php.net/manual/en/timezones.php
Fine timezone name for a country
Official
https://github.com/fronteed/icheck
HTML
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
<link href="/plugins/icheck/skins/square/green.css" rel="stylesheet"> <script src="/plugins/icheck/icheck.min.js"></script> <script> $(document).ready(function() { $('[name="delivery_method"]').iCheck({ checkboxClass: 'icheckbox_square-green', radioClass: 'iradio_square-green', //increaseArea: '20%' // optional }); $('.select_table tr input').on('ifChecked', function(){ var $this = $(this); }); }); </script> |
Laravel:
1 2 3 4 5 6 7 8 9 10 |
if(!function_exists('append_params')){ function append_params($params){ $url = url()->current(); $new_params = array_merge(request()->all(), $params); $url .= '?' . http_build_query($new_params); //logg($url); return $url; } } |
Product Page
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
var product = { 'name': '<?=$product->name?>', // Name or ID is required. 'id': '<?=$product->id?>', 'price': '<?=$product->price?>', 'brand': '<?=$store->name?>', 'category': '', 'qty': 1 } window.dataLayer = window.dataLayer || []; dataLayer.push({ 'event': 'productDetail', 'ecommerce': { 'detail': { 'actionField': {'list': 'Product Detail'}, // 'detail' actions have an optional list property. 'products': [product] } } }); function add_cart_event(qty){ product.qty = qty; dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'TWD', 'add': { // 'add' actionFieldObject measures. 'products': [product] } } }); } |
Function to get object for Pixel AddToCart in Tag manager
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
function(){ try{ var af = google_tag_manager[{{Container ID}}].dataLayer.get("ecommerce"); var product = af.add.products[0]; var data = { content_ids: [product.id], content_type: 'product', content_name: product.name, value: product.price, currency: 'TWD' } console.log(data); return data; }catch(e){ return 'undefined'; } } |
Trigger
Pixel AddToCart
If you want to inject some content from page to layout, october doesn’t have “stack”, use “placeholder” instead.
Layout:
{% placeholder scripts %}
Page:
{% put scripts %}
<script type="text/javascript">
//Some scripts here
</script>
{% endput %}
Reference:
If you want to print special characters like \r\n, you must use double quote, single quotes won’t work.
1 2 3 4 5 6 7 8 |
$name = 'Rex'; echo 'I am $name \r\n Lo'; // I am $name \r\n Lo echo "I am $name \r\n Lo"; // I am Rex // Lo |
Reference:
Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!