Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Advanced Ordernumbers for VirtueMart
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VirtueMart
Advanced Ordernumbers for VirtueMart
Commits
4868180c
There was an error fetching the commit references. Please try again later.
Commit
4868180c
authored
10 years ago
by
Reinhold Kainhofer
Browse files
Options
Downloads
Patches
Plain Diff
Remove debug output
parent
c103f51c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ordernumber.php
+0
-7
0 additions, 7 deletions
ordernumber.php
with
0 additions
and
7 deletions
ordernumber.php
+
0
−
7
View file @
4868180c
...
@@ -194,7 +194,6 @@ class plgVmShopperOrdernumber extends vmShopperPlugin {
...
@@ -194,7 +194,6 @@ class plgVmShopperOrdernumber extends vmShopperPlugin {
$this
->
setupAddressReplacements
(
$reps
,
""
,
$details
,
$nrtype
);
$this
->
setupAddressReplacements
(
$reps
,
""
,
$details
,
$nrtype
);
// print("<pre>details for $nrtype: ".print_r($details,1)."</pre>");
if
(
isset
(
$details
->
order_total
))
$reps
[
'[ordertotal]'
]
=
$details
->
order_total
;
if
(
isset
(
$details
->
order_total
))
$reps
[
'[ordertotal]'
]
=
$details
->
order_total
;
if
(
isset
(
$details
->
order_total
))
$reps
[
'[amount]'
]
=
$details
->
order_total
;
if
(
isset
(
$details
->
order_total
))
$reps
[
'[amount]'
]
=
$details
->
order_total
;
if
(
isset
(
$details
->
order_subtotal
))
$reps
[
'[ordersubtotal]'
]
=
$details
->
order_total
;
if
(
isset
(
$details
->
order_subtotal
))
$reps
[
'[ordersubtotal]'
]
=
$details
->
order_total
;
...
@@ -217,13 +216,11 @@ class plgVmShopperOrdernumber extends vmShopperPlugin {
...
@@ -217,13 +216,11 @@ class plgVmShopperOrdernumber extends vmShopperPlugin {
$orderModel
=
VmModel
::
getModel
(
'orders'
);
$orderModel
=
VmModel
::
getModel
(
'orders'
);
$productModel
=
VmModel
::
getModel
(
'product'
);
$productModel
=
VmModel
::
getModel
(
'product'
);
$order
=
(
object
)
$orderModel
->
getOrder
(
$details
->
virtuemart_order_id
);
$order
=
(
object
)
$orderModel
->
getOrder
(
$details
->
virtuemart_order_id
);
// print("<pre>Order is: ".print_r($order,1)."</pre>");
foreach
(
$order
->
items
as
$i
)
{
foreach
(
$order
->
items
as
$i
)
{
$articles
+=
$i
->
product_quantity
;
$articles
+=
$i
->
product_quantity
;
$products
+=
1
;
$products
+=
1
;
$p
=
$productModel
->
getProduct
(
$i
->
virtuemart_product_id
);
$p
=
$productModel
->
getProduct
(
$i
->
virtuemart_product_id
);
// print("<pre>Order product is: ".print_r($p,1)."</pre>");
$skus
[
$p
->
product_sku
]
=
1
;
$skus
[
$p
->
product_sku
]
=
1
;
foreach
(
$p
->
categories
as
$c
)
{
foreach
(
$p
->
categories
as
$c
)
{
$categories
[
$c
]
=
1
;
$categories
[
$c
]
=
1
;
...
@@ -235,7 +232,6 @@ class plgVmShopperOrdernumber extends vmShopperPlugin {
...
@@ -235,7 +232,6 @@ class plgVmShopperOrdernumber extends vmShopperPlugin {
}
}
}
else
{
}
else
{
$cart
=
VirtueMartCart
::
getCart
();
$cart
=
VirtueMartCart
::
getCart
();
// print("<pre>Cart is: ".print_r($cart,1)."</pre>");
foreach
(
$cart
->
products
as
$p
)
{
foreach
(
$cart
->
products
as
$p
)
{
$articles
+=
$p
->
quantity
;
$articles
+=
$p
->
quantity
;
$products
+=
1
;
$products
+=
1
;
...
@@ -271,7 +267,6 @@ class plgVmShopperOrdernumber extends vmShopperPlugin {
...
@@ -271,7 +267,6 @@ class plgVmShopperOrdernumber extends vmShopperPlugin {
protected
function
setupShippingReplacements
(
&
$reps
,
$order
,
$nrtype
)
{
protected
function
setupShippingReplacements
(
&
$reps
,
$order
,
$nrtype
)
{
if
(
isset
(
$details
->
virtuemart_paymentmethod_id
))
$reps
[
'[paymentmethod]'
]
=
$details
->
virtuemart_paymentmethod_id
;
if
(
isset
(
$details
->
virtuemart_paymentmethod_id
))
$reps
[
'[paymentmethod]'
]
=
$details
->
virtuemart_paymentmethod_id
;
if
(
isset
(
$details
->
virtuemart_shipmentmethod_id
))
$reps
[
'[shipmentmethod]'
]
=
$details
->
virtuemart_shipmentmethod_id
;
if
(
isset
(
$details
->
virtuemart_shipmentmethod_id
))
$reps
[
'[shipmentmethod]'
]
=
$details
->
virtuemart_shipmentmethod_id
;
// $reps["[shippingmethod]"] = $order->getShippingMethod();
}
}
protected
function
setupThirdPartyReplacements
(
&
$reps
,
$details
,
$nrtype
)
{
protected
function
setupThirdPartyReplacements
(
&
$reps
,
$details
,
$nrtype
)
{
...
@@ -287,12 +282,10 @@ class plgVmShopperOrdernumber extends vmShopperPlugin {
...
@@ -287,12 +282,10 @@ class plgVmShopperOrdernumber extends vmShopperPlugin {
$this
->
setupUserReplacements
(
$reps
,
$details
,
$nrtype
);
$this
->
setupUserReplacements
(
$reps
,
$details
,
$nrtype
);
$this
->
setupShippingReplacements
(
$reps
,
$details
,
$nrtype
);
$this
->
setupShippingReplacements
(
$reps
,
$details
,
$nrtype
);
$this
->
setupThirdPartyReplacements
(
$reps
,
$details
,
$nrtype
);
$this
->
setupThirdPartyReplacements
(
$reps
,
$details
,
$nrtype
);
// print("<pre>All replacements: ".print_r($reps,1)."</pre>");
return
$reps
;
return
$reps
;
}
}
protected
function
setupCustomVariables
(
$nrtype
,
$order
,
$reps
,
$customvars
)
{
protected
function
setupCustomVariables
(
$nrtype
,
$order
,
$reps
,
$customvars
)
{
print
(
"<pre>Custom Variables: "
.
print_r
(
$customvars
,
1
)
.
"</pre>"
);
foreach
(
$customvars
as
$c
)
{
foreach
(
$customvars
as
$c
)
{
$conditionvar
=
strtolower
(
$c
[
'conditionvar'
]);
$conditionvar
=
strtolower
(
$c
[
'conditionvar'
]);
$op
=
$c
[
'conditionop'
];
$op
=
$c
[
'conditionop'
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment