Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bobgo-magento-extension
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bob Public Utils
bobgo-magento-extension
Commits
6c0616b7
Commit
6c0616b7
authored
11 months ago
by
Christel Loftus
Browse files
Options
Downloads
Patches
Plain Diff
Remove company.php
parent
87f929ed
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!6
Rates at checkout
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Model/Carrier/BobGo.php
+4
-4
4 additions, 4 deletions
Model/Carrier/BobGo.php
Model/Carrier/Company.php
+0
-39
0 additions, 39 deletions
Model/Carrier/Company.php
with
4 additions
and
43 deletions
Model/Carrier/BobGo.php
+
4
−
4
View file @
6c0616b7
...
...
@@ -112,7 +112,7 @@ class BobGo extends AbstractCarrierOnline implements \Magento\Shipping\Model\Car
*/
protected
JsonFactory
$jsonFactory
;
private
$cartRepository
;
public
Company
$company
;
public
AdditionalInfo
$additionalInfo
;
/**
...
...
@@ -187,7 +187,7 @@ class BobGo extends AbstractCarrierOnline implements \Magento\Shipping\Model\Car
);
$this
->
jsonFactory
=
$jsonFactory
;
$this
->
curl
=
$curlFactory
->
create
();
$this
->
company
=
new
Company
(
);
$this
->
additionalInfo
=
new
AdditionalInfo
(
$countryFactory
);
}
/*
...
...
@@ -1004,14 +1004,14 @@ class BobGo extends AbstractCarrierOnline implements \Magento\Shipping\Model\Car
*/
public
function
getDestComp
():
mixed
{
return
$this
->
company
->
getDestComp
();
return
$this
->
additionalInfo
->
getDestComp
();
}
/**
* @return mixed|string
*/
public
function
getDestSuburb
():
mixed
{
return
$this
->
company
->
getSuburb
();
return
$this
->
additionalInfo
->
getSuburb
();
}
/**
...
...
This diff is collapsed.
Click to expand it.
Model/Carrier/Company.php
deleted
100644 → 0
+
0
−
39
View file @
87f929ed
<?php
namespace
BobGroup\BobGo\Model\Carrier
;
/**
* Get the Company information from the request body and return it
*/
class
Company
{
/**
* @return mixed|string
*/
public
function
getDestComp
():
mixed
{
$data
=
json_decode
(
file_get_contents
(
'php://input'
),
true
);
if
(
isset
(
$data
[
'address'
][
'company'
]))
{
$destComp
=
$data
[
'address'
][
'company'
];
}
else
{
$destComp
=
''
;
}
return
$destComp
;
}
public
function
getSuburb
():
mixed
{
$data
=
json_decode
(
file_get_contents
(
'php://input'
),
true
);
if
(
isset
(
$data
[
'address'
][
'custom_attributes'
][
0
][
'value'
]))
{
$destSub
=
$data
[
'address'
][
'custom_attributes'
][
0
][
'value'
];
//print_r($destSub);
}
else
{
$destSub
=
''
;
}
return
$destSub
;
}
}
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