Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
joshine
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
joshine
Commits
33236a82
Commit
33236a82
authored
Jun 16, 2023
by
liumengfei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into production
parents
4b4b955a
8c1369e2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
126 additions
and
7 deletions
+126
-7
app/code/Joshine/InstagramFeed/etc/adminhtml/system.xml
+12
-0
app/code/Joshine/Script/Console/Command/InstagramFeedPull.php
+1
-1
app/code/Magento/Checkout/Block/Onepage/Success.php
+23
-0
app/design/frontend/Joshine/breeze/Magento_Checkout/templates/success.phtml
+15
-1
app/design/frontend/Joshine/breeze/Magento_Checkout/web/template/shipping.html
+0
-5
app/design/frontend/Joshine/breeze/Magento_Sales/templates/email/items/order/default.phtml
+75
-0
No files found.
app/code/Joshine/InstagramFeed/etc/adminhtml/system.xml
View file @
33236a82
...
...
@@ -58,6 +58,18 @@
<label>
instagram
</label>
<frontend_model>
Joshine\InstagramFeed\Block\Adminhtml\System\Config\Account
</frontend_model>
</group>
<group
id=
"tracking"
translate=
"label"
type=
"text"
sortOrder=
"30"
showInDefault=
"1"
showInWebsite=
"1"
showInStore=
"1"
>
<label>
Tracking
</label>
<field
id=
"enabled"
translate=
"label comment"
type=
"select"
sortOrder=
"15"
showInDefault=
"1"
showInWebsite=
"1"
showInStore=
"1"
>
<label>
Enable
</label>
<source_model>
Magento\Config\Model\Config\Source\Yesno
</source_model>
</field>
<field
id=
"conversion_id"
translate=
"label comment"
type=
"text"
sortOrder=
"45"
showInDefault=
"1"
showInWebsite=
"1"
showInStore=
"1"
>
<label>
Conversion Identification
</label>
</field>
</group>
</section>
</system>
</config>
app/code/Joshine/Script/Console/Command/InstagramFeedPull.php
View file @
33236a82
...
...
@@ -275,7 +275,7 @@ class InstagramFeedPull extends Command
{
$path
=
$this
->
directoryList
->
getPath
(
'var'
);
$file
=
$path
.
DIRECTORY_SEPARATOR
.
mt_rand
(
10000
,
99999
)
.
time
()
.
md5
(
$url
)
.
".jpeg"
;
file_put_contents
(
$file
,
file_get_contents
(
$url
));
@
file_put_contents
(
$file
,
file_get_contents
(
$url
));
return
$file
;
}
...
...
app/code/Magento/Checkout/Block/Onepage/Success.php
View file @
33236a82
...
...
@@ -31,6 +31,7 @@ class Success extends \Magento\Framework\View\Element\Template
*/
protected
$httpContext
;
protected
$_scopeConfigInterface
;
/**
* @param \Magento\Framework\View\Element\Template\Context $context
* @param \Magento\Checkout\Model\Session $checkoutSession
...
...
@@ -50,6 +51,8 @@ class Success extends \Magento\Framework\View\Element\Template
$this
->
_orderConfig
=
$orderConfig
;
$this
->
_isScopePrivate
=
true
;
$this
->
httpContext
=
$httpContext
;
$objectManager
=
\Magento\Framework\App\ObjectManager
::
getInstance
();
$this
->
_scopeConfigInterface
=
$objectManager
->
get
(
'\Magento\Framework\App\Config\ScopeConfigInterface'
);
}
/**
...
...
@@ -130,6 +133,26 @@ class Success extends \Magento\Framework\View\Element\Template
* @return string
* @since 100.2.0
*/
public
function
getCurrency
()
{
return
$this
->
_storeManager
->
getStore
()
->
getCurrentCurrency
()
->
getCode
();
}
public
function
getTrackingEnabled
()
{
return
$this
->
_scopeConfigInterface
->
getValue
(
'joshine_instagram_feed/tracking/enabled'
);
}
public
function
getTrackingConversion
()
{
return
$this
->
_scopeConfigInterface
->
getValue
(
'joshine_instagram_feed/tracking/conversion_id'
);
}
/**
* @return string
* @since 100.2.0
*/
public
function
getContinueUrl
()
{
return
$this
->
_storeManager
->
getStore
()
->
getBaseUrl
();
...
...
app/design/frontend/Joshine/breeze/Magento_Checkout/templates/success.phtml
View file @
33236a82
...
...
@@ -20,6 +20,9 @@ if ($lid) {
}
}
}
$currency
=
$block
->
getCurrency
();
$tracking_show
=
$block
->
getTrackingEnabled
();
$tracking_conversion
=
$block
->
getTrackingConversion
();
?>
<div
class=
"checkout-success"
>
...
...
@@ -67,11 +70,22 @@ if ($lid) {
}
</style>
<script>
dataLayer
=
[];
window
.
dataLayer
=
window
.
dataLayer
||
[];
dataLayer
.
push
({
'event'
:
'purchase'
,
'value'
:
<?=
$totalPrice
?>
,
'items'
:
<?=
json_encode
(
$googleItems
,
true
)
?>
});
<?php
if
(
$block
->
getOrderId
()
&&
$tracking_show
>
0
&&
!
empty
(
$tracking_conversion
))
:?>
setTimeout
(
function
()
{
gtag
(
'event'
,
'conversion'
,
{
'send_to'
:
'<?= /* @noEscape */ $tracking_conversion ?>'
,
'value'
:
<?=
/* @noEscape */
$totalPrice
?>
,
'currency'
:
'
<?=
/* @noEscape */
$currency
?>
'
,
'transaction_id'
:
'
<?=
/* @noEscape */
$block
->
getOrderId
()
?>
'
});
},
1500
);
<?php
endif
;
?>
</script>
app/design/frontend/Joshine/breeze/Magento_Checkout/web/template/shipping.html
View file @
33236a82
...
...
@@ -16,11 +16,6 @@
<li
id=
"shipping"
class=
"checkout-shipping-address address-one"
data-bind=
"fadeVisible: addressVisible"
style=
"order:1;"
>
<!--<div class="step-title" translate="'Shipping Address'" data-role="title" />-->
<p
class=
"step-title"
>
<!--
<span class="number">
<span translate="'1'" />
</span>
-->
<span
translate=
"'Shipping address'"
/>
</p>
<div
id=
"checkout-step-shipping"
...
...
app/design/frontend/Joshine/breeze/Magento_Sales/templates/email/items/order/default.phtml
0 → 100644
View file @
33236a82
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// phpcs:disable Magento2.Templates.ThisInTemplate
// phpcs:disable Magento2.Files.LineLength, Generic.Files.LineLength
/** @var $block \Magento\Sales\Block\Order\Email\Items\DefaultItems */
/** @var $_item \Magento\Sales\Model\Order\Item */
/** @var \Magento\Framework\Escaper $escaper */
$_item
=
$block
->
getItem
();
$_order
=
$_item
->
getOrder
();
$width
=
120
;
$height
=
150
;
$_imagehelper
=
$this
->
helper
(
'Magento\Catalog\Helper\Image'
);
if
(
$childProd
=
current
(
$_item
->
getChildrenItems
())){
$productImage
=
$_imagehelper
->
init
(
$childProd
->
getProduct
(),
'category_page_list'
,
array
(
'height'
=>
$height
,
'width'
=>
$width
))
->
getUrl
();
}
else
{
$productImage
=
$_imagehelper
->
init
(
$_item
->
getProduct
(),
'category_page_list'
,
array
(
'height'
=>
$height
,
'width'
=>
$width
))
->
getUrl
();
}
?>
<tr>
<td
class=
"item-info
<?=
(
$block
->
getItemOptions
()
?
' has-extra'
:
''
)
?>
"
>
<div
style=
"width:100%"
>
<div
style=
"width:30%;float:left;"
>
<p
class=
"sku"
><img
src=
"
<?=
$productImage
?>
"
title=
"
<?=
$block
->
escapeHtml
(
$_item
->
getName
())
?>
"
alt=
"
<?=
$block
->
escapeHtml
(
$_item
->
getName
())
?>
"
/></p>
</div>
<div
style=
"width:70%;float:left;"
>
<p
class=
"product-name"
>
<?=
$escaper
->
escapeHtml
(
$_item
->
getName
())
?>
</p>
<p
class=
"sku"
>
<?=
$escaper
->
escapeHtml
(
__
(
'SKU'
))
?>
:
<?=
$escaper
->
escapeHtml
(
$block
->
getSku
(
$_item
))
?>
</p>
<?php
if
(
$block
->
getItemOptions
())
:
?>
<dl
class=
"item-options"
>
<?php
foreach
(
$block
->
getItemOptions
()
as
$option
)
:
?>
<dt><strong><em>
<?=
$escaper
->
escapeHtml
(
$option
[
'label'
])
?>
</em>
:
</strong>
<?=
/* @noEscape */
nl2br
(
$option
[
'value'
])
?>
</dt>
<?php
endforeach
;
?>
</dl>
<?php
endif
;
?>
<?php
$addInfoBlock
=
$block
->
getProductAdditionalInformationBlock
();
?>
<?php
if
(
$addInfoBlock
)
:?>
<?=
$addInfoBlock
->
setItem
(
$_item
)
->
toHtml
()
?>
<?php
endif
;
?>
<?=
$escaper
->
escapeHtml
(
$_item
->
getDescription
())
?>
</div>
</div>
</td>
<td
class=
"item-qty"
>
<?=
(
float
)
$_item
->
getQtyOrdered
()
?>
</td>
<td
class=
"item-price"
>
<?=
/* @noEscape */
$block
->
getItemPrice
(
$_item
)
?>
</td>
</tr>
<?php
if
(
$_item
->
getGiftMessageId
()
&&
$_giftMessage
=
$this
->
helper
(
\Magento\GiftMessage\Helper\Message
::
class
)
->
getGiftMessage
(
$_item
->
getGiftMessageId
())
)
:
?>
<tr>
<td
colspan=
"3"
class=
"item-extra"
>
<table
class=
"message-gift"
>
<tr>
<td>
<h3>
<?=
$escaper
->
escapeHtml
(
__
(
'Gift Message'
))
?>
</h3>
<strong>
<?=
$escaper
->
escapeHtml
(
__
(
'From:'
))
?>
</strong>
<?=
$escaper
->
escapeHtml
(
$_giftMessage
->
getSender
())
?>
<br
/><strong>
<?=
$escaper
->
escapeHtml
(
__
(
'To:'
))
?>
</strong>
<?=
$escaper
->
escapeHtml
(
$_giftMessage
->
getRecipient
())
?>
<br
/><strong>
<?=
$escaper
->
escapeHtml
(
__
(
'Message:'
))
?>
</strong>
<br
/>
<?=
$escaper
->
escapeHtml
(
$_giftMessage
->
getMessage
())
?>
</td>
</tr>
</table>
</td>
</tr>
<?php
endif
;
?>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment