Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1949536
products_option_combination_item.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Oct 29, 6:35 AM
Size
737 B
Mime Type
text/x-php
Expires
Sat, Oct 31, 6:35 AM (2 h, 25 m)
Engine
blob
Format
Raw Data
Handle
962260
Attached To
rMINC Modules.In-Commerce
products_option_combination_item.php
View Options
<?php
class
kPOCItem
extends
kDBItem
{
/**
* Returns unformatted field value
*
* @param string $field
* @return string
* @access public
*/
function
GetDBField
(
$field
)
{
if
(
$field
==
'FinalPrice'
)
{
$product
=&
$this
->
Application
->
recallObject
(
'p'
);
switch
(
$this
->
GetDBField
(
'PriceType'
))
{
case
1
:
// = (override)
return
$this
->
GetDBField
(
'Price'
);
break
;
case
2
:
// flat
return
$product
->
GetDBField
(
'Price'
)
+
$this
->
GetDBField
(
'Price'
);
break
;
case
3
:
// percent
return
$product
->
GetDBField
(
'Price'
)
*
(
1
+
$this
->
GetDBField
(
'Price'
)/
100
);
break
;
}
}
else
{
$ret
=
parent
::
GetDBField
(
$field
);
}
return
$ret
;
}
}
?>
Event Timeline
Log In to Comment