Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Shipping by Rules 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
Shipping by Rules for VirtueMart
Commits
b589bcaa
Commit
b589bcaa
authored
11 years ago
by
Reinhold Kainhofer
Browse files
Options
Downloads
Patches
Plain Diff
Implement print_r function and round/ceil/floor to round to multiples of a given value
parent
809d6cf8
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
rules_shipping_base.php
+4
-0
4 additions, 0 deletions
rules_shipping_base.php
with
4 additions
and
0 deletions
rules_shipping_base.php
+
4
−
0
View file @
b589bcaa
...
...
@@ -897,11 +897,15 @@ class ShippingRule {
case
"floor"
:
return
floor
(
$args
[
0
]);
break
;
case
"abs"
:
return
abs
(
$args
[
0
]);
break
;
case
"not"
:
return
!
$args
[
0
];
break
;
case
"print_r"
:
return
print_r
(
$args
[
0
],
1
);
break
;
}
}
if
(
count
(
$args
)
==
2
)
{
switch
(
$func
)
{
case
"digit"
:
return
substr
(
$args
[
0
],
$args
[
1
]
-
1
,
1
);
break
;
case
"round"
:
return
round
(
$args
[
0
]
/
$args
[
1
])
*
$args
[
1
];
break
;
case
"ceil"
:
return
ceil
(
$args
[
0
]
/
$args
[
1
])
*
$args
[
1
];
break
;
case
"floor"
:
return
floor
(
$args
[
0
]
/
$args
[
1
])
*
$args
[
1
];
break
;
}
}
if
(
count
(
$args
)
==
3
)
{
...
...
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