sellbrite - Version 1.1.1.0

Version Notes

- add new Sellbrite product list SOAP api with pagination
- remove using REST API

Download this release

Release Info

Developer Sellbrite
Extension sellbrite
Version 1.1.1.0
Comparing to
See all releases


Code changes from version 1.1.0.2 to 1.1.1.0

Files changed (25) hide show
  1. app/code/community/Sellbrite/.idea/.name +0 -1
  2. app/code/community/Sellbrite/.idea/Sellbrite.iml +0 -8
  3. app/code/community/Sellbrite/.idea/encodings.xml +0 -4
  4. app/code/community/Sellbrite/.idea/modules.xml +0 -8
  5. app/code/community/Sellbrite/.idea/scopes/scope_settings.xml +0 -5
  6. app/code/community/Sellbrite/.idea/vcs.xml +0 -6
  7. app/code/community/Sellbrite/.idea/workspace.xml +0 -272
  8. app/code/community/Sellbrite/Api/Block/Adminhtml/System/Config/Fieldset/Hint.php +3 -71
  9. app/code/community/Sellbrite/Api/Model/Catalog/Api2/Product/Rest/Admin/V1/Interceptor.php +0 -1037
  10. app/code/community/Sellbrite/Api/Model/Catalog/Product/Api.php +141 -0
  11. app/code/community/Sellbrite/Api/Model/Catalog/Product/Api/V2.php +8 -0
  12. app/code/community/Sellbrite/Api/Model/Catalog/Product/Format/ProductType/Configurable.php +0 -71
  13. app/code/community/Sellbrite/Api/Model/Catalog/Product/Plugin.php +0 -40
  14. app/code/community/Sellbrite/Api/Model/Catalog/ProductCollection/Plugin.php +0 -43
  15. app/code/community/Sellbrite/Api/Model/Credentials.php +0 -106
  16. app/code/community/Sellbrite/Api/Model/Resource/Token.php +0 -33
  17. app/code/community/Sellbrite/Api/Model/Token.php +0 -78
  18. app/code/community/Sellbrite/Api/data/sellbrite_setup/data-install-1.1.0.php +1 -106
  19. app/code/community/Sellbrite/Api/etc/api.xml +38 -0
  20. app/code/community/Sellbrite/Api/etc/api2.xml +0 -19
  21. app/code/community/Sellbrite/Api/etc/config.xml +1 -47
  22. app/code/community/Sellbrite/Api/etc/wsdl.xml +158 -0
  23. app/code/community/Sellbrite/Api/etc/wsi.xml +148 -0
  24. app/design/adminhtml/base/default/template/sellbrite/api/system/config/fieldset/hint.phtml +3 -14
  25. package.xml +9 -8
app/code/community/Sellbrite/.idea/.name DELETED
@@ -1 +0,0 @@
1
- Sellbrite
 
app/code/community/Sellbrite/.idea/Sellbrite.iml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="WEB_MODULE" version="4">
3
- <component name="NewModuleRootManager">
4
- <content url="file://$MODULE_DIR$" />
5
- <orderEntry type="inheritedJdk" />
6
- <orderEntry type="sourceFolder" forTests="false" />
7
- </component>
8
- </module>
 
 
 
 
 
 
 
 
app/code/community/Sellbrite/.idea/encodings.xml DELETED
@@ -1,4 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
4
- </project>
 
 
 
 
app/code/community/Sellbrite/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/Sellbrite.iml" filepath="$PROJECT_DIR$/.idea/Sellbrite.iml" />
6
- </modules>
7
- </component>
8
- </project>
 
 
 
 
 
 
 
 
app/code/community/Sellbrite/.idea/scopes/scope_settings.xml DELETED
@@ -1,5 +0,0 @@
1
- <component name="DependencyValidationManager">
2
- <state>
3
- <option name="SKIP_IMPORT_STATEMENTS" value="false" />
4
- </state>
5
- </component>
 
 
 
 
 
app/code/community/Sellbrite/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="" vcs="" />
5
- </component>
6
- </project>
 
 
 
 
 
 
app/code/community/Sellbrite/.idea/workspace.xml DELETED
@@ -1,272 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ChangeListManager">
4
- <list default="true" id="b5dcfef6-b38b-4aa8-a345-bd26b96761cc" name="Default" comment="" />
5
- <ignored path="Sellbrite.iws" />
6
- <ignored path=".idea/workspace.xml" />
7
- <ignored path=".idea/dataSources.local.xml" />
8
- <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
9
- <option name="TRACKING_ENABLED" value="true" />
10
- <option name="SHOW_DIALOG" value="false" />
11
- <option name="HIGHLIGHT_CONFLICTS" value="true" />
12
- <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
13
- <option name="LAST_RESOLUTION" value="IGNORE" />
14
- </component>
15
- <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
16
- <component name="CreatePatchCommitExecutor">
17
- <option name="PATCH_PATH" value="" />
18
- </component>
19
- <component name="DaemonCodeAnalyzer">
20
- <disable_hints />
21
- </component>
22
- <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
23
- <component name="FavoritesManager">
24
- <favorites_list name="Sellbrite" />
25
- </component>
26
- <component name="FileEditorManager">
27
- <leaf>
28
- <file leaf-file-name="Data.php" pinned="false" current-in-tab="false">
29
- <entry file="file://$PROJECT_DIR$/Api/Helper/Data.php">
30
- <provider selected="true" editor-type-id="text-editor">
31
- <state vertical-scroll-proportion="-0.0" vertical-offset="0" max-vertical-offset="195">
32
- <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
33
- <folding />
34
- </state>
35
- </provider>
36
- </entry>
37
- </file>
38
- <file leaf-file-name="Token.php" pinned="false" current-in-tab="false">
39
- <entry file="file://$PROJECT_DIR$/Api/Model/Token.php">
40
- <provider selected="true" editor-type-id="text-editor">
41
- <state vertical-scroll-proportion="26.291666" vertical-offset="631" max-vertical-offset="1245">
42
- <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
43
- <folding />
44
- </state>
45
- </provider>
46
- </entry>
47
- </file>
48
- <file leaf-file-name="Hint.php" pinned="false" current-in-tab="true">
49
- <entry file="file://$PROJECT_DIR$/Api/Block/Adminhtml/System/Config/Fieldset/Hint.php">
50
- <provider selected="true" editor-type-id="text-editor">
51
- <state vertical-scroll-proportion="0.3668478" vertical-offset="120" max-vertical-offset="2745">
52
- <caret line="17" column="7" selection-start-line="17" selection-start-column="7" selection-end-line="17" selection-end-column="7" />
53
- <folding />
54
- </state>
55
- </provider>
56
- </entry>
57
- </file>
58
- <file leaf-file-name="config.xml" pinned="false" current-in-tab="false">
59
- <entry file="file://$PROJECT_DIR$/Api/etc/config.xml">
60
- <provider selected="true" editor-type-id="text-editor">
61
- <state vertical-scroll-proportion="0.0" vertical-offset="931" max-vertical-offset="1350">
62
- <caret line="84" column="9" selection-start-line="84" selection-start-column="9" selection-end-line="84" selection-end-column="9" />
63
- <folding />
64
- </state>
65
- </provider>
66
- </entry>
67
- </file>
68
- </leaf>
69
- </component>
70
- <component name="IdeDocumentHistory">
71
- <option name="CHANGED_PATHS">
72
- <list>
73
- <option value="$PROJECT_DIR$/Api/etc/config.xml" />
74
- <option value="$PROJECT_DIR$/Api/Block/Adminhtml/System/Config/Fieldset/Hint.php" />
75
- </list>
76
- </option>
77
- </component>
78
- <component name="JsGulpfileManager">
79
- <detection-done>true</detection-done>
80
- </component>
81
- <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
82
- <component name="ProjectFrameBounds">
83
- <option name="y" value="23" />
84
- <option name="width" value="1280" />
85
- <option name="height" value="735" />
86
- </component>
87
- <component name="ProjectLevelVcsManager" settingsEditedManually="false">
88
- <OptionsSetting value="true" id="Add" />
89
- <OptionsSetting value="true" id="Remove" />
90
- <OptionsSetting value="true" id="Checkout" />
91
- <OptionsSetting value="true" id="Update" />
92
- <OptionsSetting value="true" id="Status" />
93
- <OptionsSetting value="true" id="Edit" />
94
- <ConfirmationsSetting value="0" id="Add" />
95
- <ConfirmationsSetting value="0" id="Remove" />
96
- </component>
97
- <component name="ProjectView">
98
- <navigator currentView="ProjectPane" proportions="" version="1">
99
- <flattenPackages />
100
- <showMembers />
101
- <showModules />
102
- <showLibraryContents />
103
- <hideEmptyPackages />
104
- <abbreviatePackageNames />
105
- <autoscrollToSource />
106
- <autoscrollFromSource />
107
- <sortByType />
108
- </navigator>
109
- <panes>
110
- <pane id="ProjectPane">
111
- <subPane>
112
- <PATH>
113
- <PATH_ELEMENT>
114
- <option name="myItemId" value="Sellbrite" />
115
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
116
- </PATH_ELEMENT>
117
- </PATH>
118
- <PATH>
119
- <PATH_ELEMENT>
120
- <option name="myItemId" value="Sellbrite" />
121
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
122
- </PATH_ELEMENT>
123
- <PATH_ELEMENT>
124
- <option name="myItemId" value="Sellbrite" />
125
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
126
- </PATH_ELEMENT>
127
- <PATH_ELEMENT>
128
- <option name="myItemId" value="Api" />
129
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
130
- </PATH_ELEMENT>
131
- </PATH>
132
- <PATH>
133
- <PATH_ELEMENT>
134
- <option name="myItemId" value="Sellbrite" />
135
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
136
- </PATH_ELEMENT>
137
- <PATH_ELEMENT>
138
- <option name="myItemId" value="Sellbrite" />
139
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
140
- </PATH_ELEMENT>
141
- <PATH_ELEMENT>
142
- <option name="myItemId" value="Api" />
143
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
144
- </PATH_ELEMENT>
145
- <PATH_ELEMENT>
146
- <option name="myItemId" value="etc" />
147
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
148
- </PATH_ELEMENT>
149
- </PATH>
150
- </subPane>
151
- </pane>
152
- <pane id="Scope" />
153
- </panes>
154
- </component>
155
- <component name="PropertiesComponent">
156
- <property name="WebServerToolWindowFactoryState" value="true" />
157
- <property name="last_opened_file_path" value="$PROJECT_DIR$/../../../design/adminhtml/base" />
158
- </component>
159
- <component name="RunManager">
160
- <configuration default="true" type="PHPUnitRunConfigurationType" factoryName="PHPUnit">
161
- <TestRunner />
162
- <method />
163
- </configuration>
164
- <configuration default="true" type="PhpLocalRunConfigurationType" factoryName="PHP Console">
165
- <method />
166
- </configuration>
167
- <configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
168
- <method />
169
- </configuration>
170
- <configuration default="true" type="PhpBehatConfigurationType" factoryName="Behat">
171
- <BehatRunner />
172
- <method />
173
- </configuration>
174
- <configuration default="true" type="PhpUnitRemoteRunConfigurationType" factoryName="PHPUnit on Server">
175
- <method />
176
- </configuration>
177
- <configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
178
- <method />
179
- </configuration>
180
- <list size="0" />
181
- </component>
182
- <component name="ShelveChangesManager" show_recycled="false" />
183
- <component name="TaskManager">
184
- <task active="true" id="Default" summary="Default task">
185
- <changelist id="b5dcfef6-b38b-4aa8-a345-bd26b96761cc" name="Default" comment="" />
186
- <created>1444188511065</created>
187
- <option name="number" value="Default" />
188
- <updated>1444188511065</updated>
189
- </task>
190
- <servers />
191
- </component>
192
- <component name="ToolWindowManager">
193
- <frame x="0" y="23" width="1280" height="735" extended-state="0" />
194
- <editor active="true" />
195
- <layout>
196
- <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
197
- <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
198
- <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
199
- <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32882884" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
200
- <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
201
- <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
202
- <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
203
- <window_info id="Remote Host" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
204
- <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
205
- <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
206
- <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
207
- <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
208
- <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
209
- <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
210
- <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
211
- <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
212
- <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
213
- <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
214
- <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
215
- <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
216
- </layout>
217
- </component>
218
- <component name="Vcs.Log.UiProperties">
219
- <option name="RECENTLY_FILTERED_USER_GROUPS">
220
- <collection />
221
- </option>
222
- <option name="RECENTLY_FILTERED_BRANCH_GROUPS">
223
- <collection />
224
- </option>
225
- </component>
226
- <component name="VcsContentAnnotationSettings">
227
- <option name="myLimit" value="2678400000" />
228
- </component>
229
- <component name="VcsManagerConfiguration">
230
- <option name="myTodoPanelSettings">
231
- <TodoPanelSettings />
232
- </option>
233
- </component>
234
- <component name="XDebuggerManager">
235
- <breakpoint-manager />
236
- <watches-manager />
237
- </component>
238
- <component name="editorHistoryManager">
239
- <entry file="file://$PROJECT_DIR$/Api/Helper/Data.php">
240
- <provider selected="true" editor-type-id="text-editor">
241
- <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="638">
242
- <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
243
- <folding />
244
- </state>
245
- </provider>
246
- </entry>
247
- <entry file="file://$PROJECT_DIR$/Api/Model/Token.php">
248
- <provider selected="true" editor-type-id="text-editor">
249
- <state vertical-scroll-proportion="26.291666" vertical-offset="631" max-vertical-offset="1245">
250
- <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
251
- <folding />
252
- </state>
253
- </provider>
254
- </entry>
255
- <entry file="file://$PROJECT_DIR$/Api/etc/config.xml">
256
- <provider selected="true" editor-type-id="text-editor">
257
- <state vertical-scroll-proportion="0.0" vertical-offset="931" max-vertical-offset="1350">
258
- <caret line="84" column="9" selection-start-line="84" selection-start-column="9" selection-end-line="84" selection-end-column="9" />
259
- <folding />
260
- </state>
261
- </provider>
262
- </entry>
263
- <entry file="file://$PROJECT_DIR$/Api/Block/Adminhtml/System/Config/Fieldset/Hint.php">
264
- <provider selected="true" editor-type-id="text-editor">
265
- <state vertical-scroll-proportion="0.3668478" vertical-offset="120" max-vertical-offset="2745">
266
- <caret line="17" column="7" selection-start-line="17" selection-start-column="7" selection-end-line="17" selection-end-column="7" />
267
- <folding />
268
- </state>
269
- </provider>
270
- </entry>
271
- </component>
272
- </project>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Sellbrite/Api/Block/Adminhtml/System/Config/Fieldset/Hint.php CHANGED
@@ -15,13 +15,6 @@ class Sellbrite_Api_Block_Adminhtml_System_Config_Fieldset_Hint
15
  */
16
  protected $minVersion = '1.7.0.0';
17
 
18
- /**
19
- * Maximum supported Magento version
20
- *
21
- * @var string
22
- */
23
- protected $maxVersion = '1.9.3.0';
24
-
25
  /**
26
  * Fieldset render template
27
  *
@@ -64,16 +57,6 @@ class Sellbrite_Api_Block_Adminhtml_System_Config_Fieldset_Hint
64
  return $this->minVersion;
65
  }
66
 
67
- /**
68
- * Get max version
69
- *
70
- * @return string
71
- */
72
- public function getMaxVersion()
73
- {
74
- return $this->maxVersion;
75
- }
76
-
77
  /**
78
  * Check if current Magento version is supported by extension
79
  *
@@ -95,46 +78,6 @@ class Sellbrite_Api_Block_Adminhtml_System_Config_Fieldset_Hint
95
  return Mage::getVersion();
96
  }
97
 
98
- /**
99
- * Get consumer key
100
- *
101
- * @return string
102
- */
103
- public function getConsumerKey()
104
- {
105
- return $this->credentials->getConsumerKey();
106
- }
107
-
108
- /**
109
- * Get consumer secret
110
- *
111
- * @return string
112
- */
113
- public function getConsumerSecret()
114
- {
115
- return $this->credentials->getConsumerSecret();
116
- }
117
-
118
- /**
119
- * Get access key
120
- *
121
- * @return string
122
- */
123
- public function getAccessToken()
124
- {
125
- return $this->credentials->getAccessToken();
126
- }
127
-
128
- /**
129
- * Get access secret
130
- *
131
- * @return string
132
- */
133
- public function getAccessSecret()
134
- {
135
- return $this->credentials->getAccessSecret();
136
- }
137
-
138
  /**
139
  * Get SOAP user
140
  *
@@ -145,15 +88,14 @@ class Sellbrite_Api_Block_Adminhtml_System_Config_Fieldset_Hint
145
  return $this->credentials->getSoapUser();
146
  }
147
 
148
-
149
  /**
150
- * Get site URL
151
  *
152
  * @return string
153
  */
154
- public function getSiteURL()
155
  {
156
- return $this->credentials->getSiteURL();
157
  }
158
 
159
  /**
@@ -165,14 +107,4 @@ class Sellbrite_Api_Block_Adminhtml_System_Config_Fieldset_Hint
165
  {
166
  return $this->credentials->getEndPointUrl();
167
  }
168
-
169
- /**
170
- * Get API Key
171
- *
172
- * @return string
173
- */
174
- public function getApiKey()
175
- {
176
- return $this->credentials->getApiKey();
177
- }
178
  }
15
  */
16
  protected $minVersion = '1.7.0.0';
17
 
 
 
 
 
 
 
 
18
  /**
19
  * Fieldset render template
20
  *
57
  return $this->minVersion;
58
  }
59
 
 
 
 
 
 
 
 
 
 
 
60
  /**
61
  * Check if current Magento version is supported by extension
62
  *
78
  return Mage::getVersion();
79
  }
80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  /**
82
  * Get SOAP user
83
  *
88
  return $this->credentials->getSoapUser();
89
  }
90
 
 
91
  /**
92
+ * Get API Key
93
  *
94
  * @return string
95
  */
96
+ public function getApiKey()
97
  {
98
+ return $this->credentials->getApiKey();
99
  }
100
 
101
  /**
107
  {
108
  return $this->credentials->getEndPointUrl();
109
  }
 
 
 
 
 
 
 
 
 
 
110
  }
app/code/community/Sellbrite/Api/Model/Catalog/Api2/Product/Rest/Admin/V1/Interceptor.php DELETED
@@ -1,1037 +0,0 @@
1
- <?php
2
- /**
3
- * Class Sellbrite_Api_Model_Catalog_Api2_Product_Rest_Admin_V1_Interceptor
4
- *
5
- * How To Extend a Logic of This Class?
6
- *
7
- * This class is designed to provide new extension points for overridden class Mage_Catalog_Model_Api2_Product_Rest_Admin_V1
8
- * Every extension can decorate/pluginize all methods of Mage_Catalog_Model_Api2_Product_Rest_Admin_V1 (public and protected)
9
- * using config.xml file. Please, declare your configuration in the following format:
10
- * <config>
11
- * <global>
12
- * <catalog_product_list_item_plugins>
13
- * <{intercepted_method_name}>
14
- * <{strategy_type}>
15
- * <any_node_name>namespace_module/class_name</any_node_name>
16
- * </{strategy_type}>
17
- * </{intercepted_method_name}>
18
- * </catalog_product_list_item_plugins>
19
- * </global>
20
- * </config>
21
- *
22
- * where {intercepted_method_name} - one of the method of Mage_Catalog_Model_Api2_Product_Rest_Admin_V1,
23
- * {strategy_type} - interception strategy type:
24
- * - before (method invokeBefore of your class will be called before original call),
25
- * - after (method invokeAfter of your class will be called after original call),
26
- * - around (method invokeAround of your class will be called instead of original call)
27
- */
28
- class Sellbrite_Api_Model_Catalog_Api2_Product_Rest_Admin_V1_Interceptor extends
29
- Mage_Catalog_Model_Api2_Product_Rest_Admin_V1
30
- {
31
- const LISTENER_BEFORE = 'before';
32
- const LISTENER_AROUND = 'around';
33
- const LISTENER_AFTER = 'after';
34
-
35
- /**
36
- * Get declared plugins
37
- *
38
- * @param string $methodName
39
- * @return array|null
40
- */
41
- protected function _getPluginsInfo($methodName)
42
- {
43
- $pluginInfo = Mage::getConfig()->getNode(
44
- 'global/catalog_product_list_item_plugins/' . $methodName
45
- );
46
-
47
- if (!$pluginInfo) {
48
- return null;
49
- }
50
- return $pluginInfo->asArray();
51
- }
52
-
53
- /**
54
- * Call plugins
55
- *
56
- * @param string $method
57
- * @param array $arguments
58
- * @param array $pluginInfo
59
- * @return mixed
60
- */
61
- protected function ___callPlugins($method, array $arguments, array $pluginInfo)
62
- {
63
- $result = null;
64
- if (isset($pluginInfo[self::LISTENER_BEFORE])) {
65
- // Call 'before' listeners
66
- foreach ($pluginInfo[self::LISTENER_BEFORE] as $code) {
67
- $beforeResult = call_user_func_array(array(Mage::getSingleton($code), 'invokeBefore'), $arguments);
68
- if ($beforeResult) {
69
- $arguments = $beforeResult;
70
- }
71
- }
72
- }
73
-
74
- if (isset($pluginInfo[self::LISTENER_AROUND])) {
75
- // Call 'around' listener
76
- foreach ($pluginInfo[self::LISTENER_AFTER] as $code) {
77
- $result = call_user_func_array(
78
- array(Mage::getSingleton($code), 'invokeAround'),
79
- array_merge($arguments, $result)
80
- );
81
- }
82
- } else {
83
- // Call original method
84
- $result = call_user_func_array(array('parent', $method), $arguments);
85
- }
86
-
87
- if (isset($pluginInfo[self::LISTENER_AFTER])) {
88
- // Call 'after' listeners
89
- foreach ($pluginInfo[self::LISTENER_AFTER] as $code) {
90
- $result = call_user_func_array(array(Mage::getSingleton($code), 'invokeAfter'), array($result));
91
- }
92
- }
93
- return $result;
94
- }
95
-
96
-
97
- //======================================= Start Auto-generated Code ======================================//
98
-
99
- /**
100
- * {@inheritdoc}
101
- */
102
- public function getAvailableAttributes($userType, $operation)
103
- {
104
- $pluginInfo = $this->_getPluginsInfo('getAvailableAttributes');
105
- if (!$pluginInfo) {
106
- return parent::getAvailableAttributes($userType, $operation);
107
- } else {
108
- return $this->___callPlugins('getAvailableAttributes', func_get_args(), $pluginInfo);
109
- }
110
- }
111
-
112
- /**
113
- * {@inheritdoc}
114
- */
115
- protected function _isAttributeVisible(Mage_Catalog_Model_Resource_Eav_Attribute $attribute, $userType)
116
- {
117
- $pluginInfo = $this->_getPluginsInfo('_isAttributeVisible');
118
- if (!$pluginInfo) {
119
- return parent::_isAttributeVisible($attribute, $userType);
120
- } else {
121
- return $this->___callPlugins('_isAttributeVisible', func_get_args(), $pluginInfo);
122
- }
123
- }
124
-
125
- /**
126
- * {@inheritdoc}
127
- */
128
- public function dispatch()
129
- {
130
- $pluginInfo = $this->_getPluginsInfo('dispatch');
131
- if (!$pluginInfo) {
132
- parent::dispatch();
133
- } else {
134
- return $this->___callPlugins('dispatch', func_get_args(), $pluginInfo);
135
- }
136
- }
137
-
138
- /**
139
- * {@inheritdoc}
140
- */
141
- protected function _errorIfMethodNotExist($methodName)
142
- {
143
- $pluginInfo = $this->_getPluginsInfo('_errorIfMethodNotExist');
144
- if (!$pluginInfo) {
145
- parent::_errorIfMethodNotExist($methodName);
146
- } else {
147
- return $this->___callPlugins('_errorIfMethodNotExist', func_get_args(), $pluginInfo);
148
- }
149
- }
150
-
151
- /**
152
- * {@inheritdoc}
153
- */
154
- protected function _checkMethodExist($methodName)
155
- {
156
- $pluginInfo = $this->_getPluginsInfo('_checkMethodExist');
157
- if (!$pluginInfo) {
158
- return parent::_checkMethodExist($methodName);
159
- } else {
160
- return $this->___callPlugins('_checkMethodExist', func_get_args(), $pluginInfo);
161
- }
162
- }
163
-
164
- /**
165
- * {@inheritdoc}
166
- */
167
- public function getRequest()
168
- {
169
- $pluginInfo = $this->_getPluginsInfo('getRequest');
170
- if (!$pluginInfo) {
171
- return parent::getRequest();
172
- } else {
173
- return $this->___callPlugins('getRequest', func_get_args(), $pluginInfo);
174
- }
175
- }
176
-
177
- /**
178
- * {@inheritdoc}
179
- */
180
- public function setRequest(Mage_Api2_Model_Request $request)
181
- {
182
- $pluginInfo = $this->_getPluginsInfo('setRequest');
183
- if (!$pluginInfo) {
184
- return parent::setRequest($request);
185
- } else {
186
- return $this->___callPlugins('setRequest', func_get_args(), $pluginInfo);
187
- }
188
- }
189
-
190
- /**
191
- * {@inheritdoc}
192
- */
193
- public function getResourceType()
194
- {
195
- $pluginInfo = $this->_getPluginsInfo('getResourceType');
196
- if (!$pluginInfo) {
197
- return parent::getResourceType();
198
- } else {
199
- return $this->___callPlugins('getResourceType', func_get_args(), $pluginInfo);
200
- }
201
- }
202
-
203
- /**
204
- * {@inheritdoc}
205
- */
206
- public function setResourceType($resourceType)
207
- {
208
- $pluginInfo = $this->_getPluginsInfo('setResourceType');
209
- if (!$pluginInfo) {
210
- return parent::setResourceType($resourceType);
211
- } else {
212
- return $this->___callPlugins('setResourceType', func_get_args(), $pluginInfo);
213
- }
214
- }
215
-
216
- /**
217
- * {@inheritdoc}
218
- */
219
- public function getApiType()
220
- {
221
- $pluginInfo = $this->_getPluginsInfo('getApiType');
222
- if (!$pluginInfo) {
223
- return parent::getApiType();
224
- } else {
225
- return $this->___callPlugins('getApiType', func_get_args(), $pluginInfo);
226
- }
227
- }
228
-
229
- /**
230
- * {@inheritdoc}
231
- */
232
- public function setApiType($apiType)
233
- {
234
- $pluginInfo = $this->_getPluginsInfo('setApiType');
235
- if (!$pluginInfo) {
236
- return parent::setApiType($apiType);
237
- } else {
238
- return $this->___callPlugins('setApiType', func_get_args(), $pluginInfo);
239
- }
240
- }
241
-
242
- /**
243
- * {@inheritdoc}
244
- */
245
- public function getVersion()
246
- {
247
- $pluginInfo = $this->_getPluginsInfo('getVersion');
248
- if (!$pluginInfo) {
249
- return parent::getVersion();
250
- } else {
251
- return $this->___callPlugins('getVersion', func_get_args(), $pluginInfo);
252
- }
253
- }
254
-
255
- /**
256
- * {@inheritdoc}
257
- */
258
- public function setVersion($version)
259
- {
260
- $pluginInfo = $this->_getPluginsInfo('setVersion');
261
- if (!$pluginInfo) {
262
- parent::setVersion($version);
263
- } else {
264
- return $this->___callPlugins('setVersion', func_get_args(), $pluginInfo);
265
- }
266
- }
267
-
268
- /**
269
- * {@inheritdoc}
270
- */
271
- public function getResponse()
272
- {
273
- $pluginInfo = $this->_getPluginsInfo('getResponse');
274
- if (!$pluginInfo) {
275
- return parent::getResponse();
276
- } else {
277
- return $this->___callPlugins('getResponse', func_get_args(), $pluginInfo);
278
- }
279
- }
280
-
281
- /**
282
- * {@inheritdoc}
283
- */
284
- public function setResponse(Mage_Api2_Model_Response $response)
285
- {
286
- $pluginInfo = $this->_getPluginsInfo('setResponse');
287
- if (!$pluginInfo) {
288
- parent::setResponse($response);
289
- } else {
290
- return $this->___callPlugins('setResponse', func_get_args(), $pluginInfo);
291
- }
292
- }
293
-
294
- /**
295
- * {@inheritdoc}
296
- */
297
- public function getFilter()
298
- {
299
- $pluginInfo = $this->_getPluginsInfo('getFilter');
300
- if (!$pluginInfo) {
301
- return parent::getFilter();
302
- } else {
303
- return $this->___callPlugins('getFilter', func_get_args(), $pluginInfo);
304
- }
305
- }
306
-
307
- /**
308
- * {@inheritdoc}
309
- */
310
- public function setFilter(Mage_Api2_Model_Acl_Filter $filter)
311
- {
312
- $pluginInfo = $this->_getPluginsInfo('setFilter');
313
- if (!$pluginInfo) {
314
- parent::setFilter($filter);
315
- } else {
316
- return $this->___callPlugins('setFilter', func_get_args(), $pluginInfo);
317
- }
318
- }
319
-
320
- /**
321
- * {@inheritdoc}
322
- */
323
- public function getRenderer()
324
- {
325
- $pluginInfo = $this->_getPluginsInfo('getRenderer');
326
- if (!$pluginInfo) {
327
- return parent::getRenderer();
328
- } else {
329
- return $this->___callPlugins('getRenderer', func_get_args(), $pluginInfo);
330
- }
331
- }
332
-
333
- /**
334
- * {@inheritdoc}
335
- */
336
- public function setRenderer(Mage_Api2_Model_Renderer_Interface $renderer)
337
- {
338
- $pluginInfo = $this->_getPluginsInfo('setRenderer');
339
- if (!$pluginInfo) {
340
- parent::setRenderer($renderer);
341
- } else {
342
- return $this->___callPlugins('setRenderer', func_get_args(), $pluginInfo);
343
- }
344
- }
345
-
346
- /**
347
- * {@inheritdoc}
348
- */
349
- public function getUserType()
350
- {
351
- $pluginInfo = $this->_getPluginsInfo('getUserType');
352
- if (!$pluginInfo) {
353
- return parent::getUserType();
354
- } else {
355
- return $this->___callPlugins('getUserType', func_get_args(), $pluginInfo);
356
- }
357
- }
358
-
359
- /**
360
- * {@inheritdoc}
361
- */
362
- public function setUserType($userType)
363
- {
364
- $pluginInfo = $this->_getPluginsInfo('setUserType');
365
- if (!$pluginInfo) {
366
- return parent::setUserType($userType);
367
- } else {
368
- return $this->___callPlugins('setUserType', func_get_args(), $pluginInfo);
369
- }
370
- }
371
-
372
- /**
373
- * {@inheritdoc}
374
- */
375
- public function getApiUser()
376
- {
377
- $pluginInfo = $this->_getPluginsInfo('getApiUser');
378
- if (!$pluginInfo) {
379
- return parent::getApiUser();
380
- } else {
381
- return $this->___callPlugins('getApiUser', func_get_args(), $pluginInfo);
382
- }
383
- }
384
-
385
- /**
386
- * {@inheritdoc}
387
- */
388
- public function setApiUser(Mage_Api2_Model_Auth_User_Abstract $apiUser)
389
- {
390
- $pluginInfo = $this->_getPluginsInfo('setApiUser');
391
- if (!$pluginInfo) {
392
- return parent::setApiUser($apiUser);
393
- } else {
394
- return $this->___callPlugins('setApiUser', func_get_args(), $pluginInfo);
395
- }
396
- }
397
-
398
- /**
399
- * {@inheritdoc}
400
- */
401
- public function getActionType()
402
- {
403
- $pluginInfo = $this->_getPluginsInfo('getActionType');
404
- if (!$pluginInfo) {
405
- return parent::getActionType();
406
- } else {
407
- return $this->___callPlugins('getActionType', func_get_args(), $pluginInfo);
408
- }
409
- }
410
-
411
- /**
412
- * {@inheritdoc}
413
- */
414
- public function setActionType($actionType)
415
- {
416
- $pluginInfo = $this->_getPluginsInfo('setActionType');
417
- if (!$pluginInfo) {
418
- return parent::setActionType($actionType);
419
- } else {
420
- return $this->___callPlugins('setActionType', func_get_args(), $pluginInfo);
421
- }
422
- }
423
-
424
- /**
425
- * {@inheritdoc}
426
- */
427
- public function getOperation()
428
- {
429
- $pluginInfo = $this->_getPluginsInfo('getOperation');
430
- if (!$pluginInfo) {
431
- return parent::getOperation();
432
- } else {
433
- return $this->___callPlugins('getOperation', func_get_args(), $pluginInfo);
434
- }
435
- }
436
-
437
- /**
438
- * {@inheritdoc}
439
- */
440
- public function setOperation($operation)
441
- {
442
- $pluginInfo = $this->_getPluginsInfo('setOperation');
443
- if (!$pluginInfo) {
444
- return parent::setOperation($operation);
445
- } else {
446
- return $this->___callPlugins('setOperation', func_get_args(), $pluginInfo);
447
- }
448
- }
449
-
450
- /**
451
- * {@inheritdoc}
452
- */
453
- public function getConfig()
454
- {
455
- $pluginInfo = $this->_getPluginsInfo('getConfig');
456
- if (!$pluginInfo) {
457
- return parent::getConfig();
458
- } else {
459
- return $this->___callPlugins('getConfig', func_get_args(), $pluginInfo);
460
- }
461
- }
462
-
463
- /**
464
- * {@inheritdoc}
465
- */
466
- public function getWorkingModel()
467
- {
468
- $pluginInfo = $this->_getPluginsInfo('getWorkingModel');
469
- if (!$pluginInfo) {
470
- return parent::getWorkingModel();
471
- } else {
472
- return $this->___callPlugins('getWorkingModel', func_get_args(), $pluginInfo);
473
- }
474
- }
475
-
476
- /**
477
- * {@inheritdoc}
478
- */
479
- protected function _render($data)
480
- {
481
- $pluginInfo = $this->_getPluginsInfo('_render');
482
- if (!$pluginInfo) {
483
- parent::_render($data);
484
- } else {
485
- return $this->___callPlugins('_render', func_get_args(), $pluginInfo);
486
- }
487
- }
488
-
489
- /**
490
- * {@inheritdoc}
491
- */
492
- protected function _critical($message, $code = null)
493
- {
494
- $pluginInfo = $this->_getPluginsInfo('_critical');
495
- if (!$pluginInfo) {
496
- parent::_critical($message, $code);
497
- } else {
498
- return $this->___callPlugins('_critical', func_get_args(), $pluginInfo);
499
- }
500
- }
501
-
502
- /**
503
- * {@inheritdoc}
504
- */
505
- protected function _getCriticalErrors()
506
- {
507
- $pluginInfo = $this->_getPluginsInfo('_getCriticalErrors');
508
- if (!$pluginInfo) {
509
- return parent::_getCriticalErrors();
510
- } else {
511
- return $this->___callPlugins('_getCriticalErrors', func_get_args(), $pluginInfo);
512
- }
513
- }
514
-
515
- /**
516
- * {@inheritdoc}
517
- */
518
- protected function _error($message, $code)
519
- {
520
- $pluginInfo = $this->_getPluginsInfo('_error');
521
- if (!$pluginInfo) {
522
- return parent::_error($message, $code);
523
- } else {
524
- return $this->___callPlugins('_error', func_get_args(), $pluginInfo);
525
- }
526
- }
527
-
528
- /**
529
- * {@inheritdoc}
530
- */
531
- protected function _successMessage($message, $code, $params = array())
532
- {
533
- $pluginInfo = $this->_getPluginsInfo('_successMessage');
534
- if (!$pluginInfo) {
535
- return parent::_successMessage($message, $code, $params);
536
- } else {
537
- return $this->___callPlugins('_successMessage', func_get_args(), $pluginInfo);
538
- }
539
- }
540
-
541
- /**
542
- * {@inheritdoc}
543
- */
544
- protected function _errorMessage($message, $code, $params = array())
545
- {
546
- $pluginInfo = $this->_getPluginsInfo('_errorMessage');
547
- if (!$pluginInfo) {
548
- return parent::_errorMessage($message, $code, $params);
549
- } else {
550
- return $this->___callPlugins('_errorMessage', func_get_args(), $pluginInfo);
551
- }
552
- }
553
-
554
- /**
555
- * {@inheritdoc}
556
- */
557
- protected function _applyFilter(Varien_Data_Collection_Db $collection)
558
- {
559
- $pluginInfo = $this->_getPluginsInfo('_applyFilter');
560
- if (!$pluginInfo) {
561
- return parent::_applyFilter($collection);
562
- } else {
563
- return $this->___callPlugins('_applyFilter', func_get_args(), $pluginInfo);
564
- }
565
- }
566
-
567
- /**
568
- * {@inheritdoc}
569
- */
570
- protected function _multicall($resourceInstanceId)
571
- {
572
- $pluginInfo = $this->_getPluginsInfo('_multicall');
573
- if (!$pluginInfo) {
574
- return parent::_multicall($resourceInstanceId);
575
- } else {
576
- return $this->___callPlugins('_multicall', func_get_args(), $pluginInfo);
577
- }
578
- }
579
-
580
- /**
581
- * {@inheritdoc}
582
- */
583
- protected function _getSubModel($resourceId, array $requestParams)
584
- {
585
- $pluginInfo = $this->_getPluginsInfo('_getSubModel');
586
- if (!$pluginInfo) {
587
- return parent::_getSubModel($resourceId, $requestParams);
588
- } else {
589
- return $this->___callPlugins('_getSubModel', func_get_args(), $pluginInfo);
590
- }
591
- }
592
-
593
- /**
594
- * {@inheritdoc}
595
- */
596
- protected function _isSubCallAllowed($resourceId)
597
- {
598
- $pluginInfo = $this->_getPluginsInfo('_isSubCallAllowed');
599
- if (!$pluginInfo) {
600
- return parent::_isSubCallAllowed($resourceId);
601
- } else {
602
- return $this->___callPlugins('_isSubCallAllowed', func_get_args(), $pluginInfo);
603
- }
604
- }
605
-
606
- /**
607
- * {@inheritdoc}
608
- */
609
- public function setReturnData($flag)
610
- {
611
- $pluginInfo = $this->_getPluginsInfo('setReturnData');
612
- if (!$pluginInfo) {
613
- return parent::setReturnData($flag);
614
- } else {
615
- return $this->___callPlugins('setReturnData', func_get_args(), $pluginInfo);
616
- }
617
- }
618
-
619
- /**
620
- * {@inheritdoc}
621
- */
622
- protected function _getLocation($resource)
623
- {
624
- $pluginInfo = $this->_getPluginsInfo('_getLocation');
625
- if (!$pluginInfo) {
626
- return parent::_getLocation($resource);
627
- } else {
628
- return $this->___callPlugins('_getLocation', func_get_args(), $pluginInfo);
629
- }
630
- }
631
-
632
- /**
633
- * {@inheritdoc}
634
- */
635
- protected function _getResourceAttributes()
636
- {
637
- $pluginInfo = $this->_getPluginsInfo('_getResourceAttributes');
638
- if (!$pluginInfo) {
639
- return parent::_getResourceAttributes();
640
- } else {
641
- return $this->___callPlugins('_getResourceAttributes', func_get_args(), $pluginInfo);
642
- }
643
- }
644
-
645
- /**
646
- * {@inheritdoc}
647
- */
648
- public function getExcludedAttributes($userType, $operation)
649
- {
650
- $pluginInfo = $this->_getPluginsInfo('getExcludedAttributes');
651
- if (!$pluginInfo) {
652
- return parent::getExcludedAttributes($userType, $operation);
653
- } else {
654
- return $this->___callPlugins('getExcludedAttributes', func_get_args(), $pluginInfo);
655
- }
656
- }
657
-
658
- /**
659
- * {@inheritdoc}
660
- */
661
- public function getForcedAttributes()
662
- {
663
- $pluginInfo = $this->_getPluginsInfo('getForcedAttributes');
664
- if (!$pluginInfo) {
665
- return parent::getForcedAttributes();
666
- } else {
667
- return $this->___callPlugins('getForcedAttributes', func_get_args(), $pluginInfo);
668
- }
669
- }
670
-
671
- /**
672
- * {@inheritdoc}
673
- */
674
- public function getIncludedAttributes($userType, $operationType)
675
- {
676
- $pluginInfo = $this->_getPluginsInfo('getIncludedAttributes');
677
- if (!$pluginInfo) {
678
- return parent::getIncludedAttributes($userType, $operationType);
679
- } else {
680
- return $this->___callPlugins('getIncludedAttributes', func_get_args(), $pluginInfo);
681
- }
682
- }
683
-
684
- /**
685
- * {@inheritdoc}
686
- */
687
- public function getEntityOnlyAttributes($userType, $operationType)
688
- {
689
- $pluginInfo = $this->_getPluginsInfo('getEntityOnlyAttributes');
690
- if (!$pluginInfo) {
691
- return parent::getEntityOnlyAttributes($userType, $operationType);
692
- } else {
693
- return $this->___callPlugins('getEntityOnlyAttributes', func_get_args(), $pluginInfo);
694
- }
695
- }
696
-
697
- /**
698
- * {@inheritdoc}
699
- */
700
- public function getAvailableAttributesFromConfig()
701
- {
702
- $pluginInfo = $this->_getPluginsInfo('getAvailableAttributesFromConfig');
703
- if (!$pluginInfo) {
704
- return parent::getAvailableAttributesFromConfig();
705
- } else {
706
- return $this->___callPlugins('getAvailableAttributesFromConfig', func_get_args(), $pluginInfo);
707
- }
708
- }
709
-
710
- /**
711
- * {@inheritdoc}
712
- */
713
- public function getDbAttributes()
714
- {
715
- $pluginInfo = $this->_getPluginsInfo('getDbAttributes');
716
- if (!$pluginInfo) {
717
- return parent::getDbAttributes();
718
- } else {
719
- return $this->___callPlugins('getDbAttributes', func_get_args(), $pluginInfo);
720
- }
721
- }
722
-
723
- /**
724
- * {@inheritdoc}
725
- */
726
- public function getEavAttributes($onlyVisible = false, $excludeSystem = false)
727
- {
728
- $pluginInfo = $this->_getPluginsInfo('getEavAttributes');
729
- if (!$pluginInfo) {
730
- return parent::getEavAttributes($onlyVisible, $excludeSystem);
731
- } else {
732
- return $this->___callPlugins('getEavAttributes', func_get_args(), $pluginInfo);
733
- }
734
- }
735
-
736
- /**
737
- * {@inheritdoc}
738
- */
739
- protected function _getStore()
740
- {
741
- $pluginInfo = $this->_getPluginsInfo('_getStore');
742
- if (!$pluginInfo) {
743
- return parent::_getStore();
744
- } else {
745
- return $this->___callPlugins('_getStore', func_get_args(), $pluginInfo);
746
- }
747
- }
748
-
749
- /**
750
- * {@inheritdoc}
751
- */
752
- protected function _retrieve()
753
- {
754
- $pluginInfo = $this->_getPluginsInfo('_retrieve');
755
- if (!$pluginInfo) {
756
- return parent::_retrieve();
757
- } else {
758
- return $this->___callPlugins('_retrieve', func_get_args(), $pluginInfo);
759
- }
760
- }
761
-
762
- /**
763
- * {@inheritdoc}
764
- */
765
- protected function _applyCategoryFilter(Mage_Catalog_Model_Resource_Product_Collection $collection)
766
- {
767
- $pluginInfo = $this->_getPluginsInfo('_applyCategoryFilter');
768
- if (!$pluginInfo) {
769
- parent::_applyCategoryFilter($collection);
770
- } else {
771
- return $this->___callPlugins('_applyCategoryFilter', func_get_args(), $pluginInfo);
772
- }
773
- }
774
-
775
- /**
776
- * {@inheritdoc}
777
- */
778
- protected function _getProduct()
779
- {
780
- $pluginInfo = $this->_getPluginsInfo('_getProduct');
781
- if (!$pluginInfo) {
782
- return parent::_getProduct();
783
- } else {
784
- return $this->___callPlugins('_getProduct', func_get_args(), $pluginInfo);
785
- }
786
- }
787
-
788
- /**
789
- * {@inheritdoc}
790
- */
791
- protected function _setProduct(Mage_Catalog_Model_Product $product)
792
- {
793
- $pluginInfo = $this->_getPluginsInfo('_setProduct');
794
- if (!$pluginInfo) {
795
- parent::_setProduct($product);
796
- } else {
797
- return $this->___callPlugins('_setProduct', func_get_args(), $pluginInfo);
798
- }
799
- }
800
-
801
- /**
802
- * {@inheritdoc}
803
- */
804
- protected function _getCategoryById($categoryId)
805
- {
806
- $pluginInfo = $this->_getPluginsInfo('_getCategoryById');
807
- if (!$pluginInfo) {
808
- return parent::_getCategoryById($categoryId);
809
- } else {
810
- return $this->___callPlugins('_getCategoryById', func_get_args(), $pluginInfo);
811
- }
812
- }
813
-
814
- /**
815
- * {@inheritdoc}
816
- */
817
- protected function _getPrice($price, $includingTax = null, $shippingAddress = null,
818
- $billingAddress = null, $ctc = null, $priceIncludesTax = null
819
- )
820
- {
821
- $pluginInfo = $this->_getPluginsInfo('_getPrice');
822
- if (!$pluginInfo) {
823
- return parent::_getPrice($price, $includingTax, $shippingAddress, $billingAddress, $ctc, $priceIncludesTax);
824
- } else {
825
- return $this->___callPlugins('_getPrice', func_get_args(), $pluginInfo);
826
- }
827
- }
828
-
829
- /**
830
- * {@inheritdoc}
831
- */
832
- protected function _calculatePrice($price, $percent, $includeTax)
833
- {
834
- $pluginInfo = $this->_getPluginsInfo('_calculatePrice');
835
- if (!$pluginInfo) {
836
- return parent::_calculatePrice($price, $percent, $includeTax);
837
- } else {
838
- return $this->___callPlugins('_calculatePrice', func_get_args(), $pluginInfo);
839
- }
840
- }
841
-
842
- /**
843
- * {@inheritdoc}
844
- */
845
- protected function _getTierPrices()
846
- {
847
- $pluginInfo = $this->_getPluginsInfo('_getTierPrices');
848
- if (!$pluginInfo) {
849
- return parent::_getTierPrices();
850
- } else {
851
- return $this->___callPlugins('_getTierPrices', func_get_args(), $pluginInfo);
852
- }
853
- }
854
-
855
- /**
856
- * {@inheritdoc}
857
- */
858
- protected function _getCustomerGroupId()
859
- {
860
- $pluginInfo = $this->_getPluginsInfo('_getCustomerGroupId');
861
- if (!$pluginInfo) {
862
- return parent::_getCustomerGroupId();
863
- } else {
864
- return $this->___callPlugins('_getCustomerGroupId', func_get_args(), $pluginInfo);
865
- }
866
- }
867
-
868
- /**
869
- * {@inheritdoc}
870
- */
871
- protected function _applyTaxToPrice($price, $withTax = true)
872
- {
873
- $pluginInfo = $this->_getPluginsInfo('_applyTaxToPrice');
874
- if (!$pluginInfo) {
875
- return parent::_applyTaxToPrice($price, $withTax);
876
- } else {
877
- return $this->___callPlugins('_applyTaxToPrice', func_get_args(), $pluginInfo);
878
- }
879
- }
880
-
881
- /**
882
- * {@inheritdoc}
883
- */
884
- protected function _prepareProductForResponse(Mage_Catalog_Model_Product $product)
885
- {
886
- $pluginInfo = $this->_getPluginsInfo('_prepareProductForResponse');
887
- if (!$pluginInfo) {
888
- parent::_prepareProductForResponse($product);
889
- } else {
890
- return $this->___callPlugins('_prepareProductForResponse', func_get_args(), $pluginInfo);
891
- }
892
- }
893
-
894
- /**
895
- * {@inheritdoc}
896
- */
897
- protected function _filterOutArrayKeys(array $array, array $keys, $dropOrigKeys = false)
898
- {
899
- $pluginInfo = $this->_getPluginsInfo('_filterOutArrayKeys');
900
- if (!$pluginInfo) {
901
- return parent::_filterOutArrayKeys($array, $keys, $dropOrigKeys);
902
- } else {
903
- return $this->___callPlugins('_filterOutArrayKeys', func_get_args(), $pluginInfo);
904
- }
905
- }
906
-
907
- /**
908
- * {@inheritdoc}
909
- */
910
- protected function _retrieveCollection()
911
- {
912
- $pluginInfo = $this->_getPluginsInfo('_retrieveCollection');
913
- if (!$pluginInfo) {
914
- return parent::_retrieveCollection();
915
- } else {
916
- return $this->___callPlugins('_retrieveCollection', func_get_args(), $pluginInfo);
917
- }
918
- }
919
-
920
- /**
921
- * {@inheritdoc}
922
- */
923
- protected function _delete()
924
- {
925
- $pluginInfo = $this->_getPluginsInfo('_delete');
926
- if (!$pluginInfo) {
927
- parent::_delete();
928
- } else {
929
- return $this->___callPlugins('_delete', func_get_args(), $pluginInfo);
930
- }
931
- }
932
-
933
- /**
934
- * {@inheritdoc}
935
- */
936
- protected function _create(array $data)
937
- {
938
- $pluginInfo = $this->_getPluginsInfo('_create');
939
- if (!$pluginInfo) {
940
- return parent::_create($data);
941
- } else {
942
- return $this->___callPlugins('_create', func_get_args(), $pluginInfo);
943
- }
944
- }
945
-
946
- /**
947
- * {@inheritdoc}
948
- */
949
- protected function _update(array $data)
950
- {
951
- $pluginInfo = $this->_getPluginsInfo('_update');
952
- if (!$pluginInfo) {
953
- parent::_update($data);
954
- } else {
955
- return $this->___callPlugins('_update', func_get_args(), $pluginInfo);
956
- }
957
- }
958
-
959
- /**
960
- * {@inheritdoc}
961
- */
962
- protected function _isManageStockEnabled($stockData)
963
- {
964
- $pluginInfo = $this->_getPluginsInfo('_isManageStockEnabled');
965
- if (!$pluginInfo) {
966
- return parent::_isManageStockEnabled($stockData);
967
- } else {
968
- return $this->___callPlugins('_isManageStockEnabled', func_get_args(), $pluginInfo);
969
- }
970
- }
971
-
972
- /**
973
- * {@inheritdoc}
974
- */
975
- protected function _isConfigValueUsed($data, $field)
976
- {
977
- $pluginInfo = $this->_getPluginsInfo('_isConfigValueUsed');
978
- if (!$pluginInfo) {
979
- return parent::_isConfigValueUsed($data, $field);
980
- } else {
981
- return $this->___callPlugins('_isConfigValueUsed', func_get_args(), $pluginInfo);
982
- }
983
- }
984
-
985
- /**
986
- * {@inheritdoc}
987
- */
988
- protected function _prepareDataForSave($product, $productData)
989
- {
990
- $pluginInfo = $this->_getPluginsInfo('_prepareDataForSave');
991
- if (!$pluginInfo) {
992
- parent::_prepareDataForSave($product, $productData);
993
- } else {
994
- return $this->___callPlugins('_prepareDataForSave', func_get_args(), $pluginInfo);
995
- }
996
- }
997
-
998
- /**
999
- * {@inheritdoc}
1000
- */
1001
- protected function _filterStockData(&$stockData)
1002
- {
1003
- $pluginInfo = $this->_getPluginsInfo('_filterStockData');
1004
- if (!$pluginInfo) {
1005
- parent::_filterStockData($stockData);
1006
- } else {
1007
- return $this->___callPlugins('_filterStockData', func_get_args(), $pluginInfo);
1008
- }
1009
- }
1010
-
1011
- /**
1012
- * {@inheritdoc}
1013
- */
1014
- protected function _filterConfigValueUsed(&$data, $fields)
1015
- {
1016
- $pluginInfo = $this->_getPluginsInfo('_filterConfigValueUsed');
1017
- if (!$pluginInfo) {
1018
- parent::_filterConfigValueUsed($data, $fields);
1019
- } else {
1020
- return $this->___callPlugins('_filterConfigValueUsed', func_get_args(), $pluginInfo);
1021
- }
1022
- }
1023
-
1024
- /**
1025
- * {@inheritdoc}
1026
- */
1027
- protected function _isAllowedAttribute($attribute, $attributes = null)
1028
- {
1029
- $pluginInfo = $this->_getPluginsInfo('_isAllowedAttribute');
1030
- if (!$pluginInfo) {
1031
- return parent::_isAllowedAttribute($attribute, $attributes);
1032
- } else {
1033
- return $this->___callPlugins('_isAllowedAttribute', func_get_args(), $pluginInfo);
1034
- }
1035
- }
1036
- //======================================= Start Auto-generated Code ======================================//
1037
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Sellbrite/Api/Model/Catalog/Product/Api.php ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Sellbrite_Api_Model_Catalog_Product_Api extends Mage_Catalog_Model_Product_Api
3
+ {
4
+ /**
5
+ * Retrieve products list by filters
6
+ *
7
+ * @param null|object|array $filters
8
+ * @param string|int $store
9
+ * @return array
10
+ */
11
+ public function items($filters = null, $store = null)
12
+ {
13
+ /** @var Mage_Catalog_Model_Resource_Product_Collection $collection */
14
+ $collection = Mage::getModel('catalog/product')->getCollection()
15
+ ->addStoreFilter($this->_getStoreId($store))
16
+ ->addAttributeToSelect('*');
17
+
18
+ /** @var $apiHelper Mage_Api_Helper_Data */
19
+ $apiHelper = Mage::helper('api');
20
+ $filters = $apiHelper->parseFilters($filters, $this->_filtersMap);
21
+
22
+ $pageNum = isset($filters['page']) ? array_pop($filters['page']) : 1;
23
+ $pageSize = isset($filters['limit']) ? array_pop($filters['limit']) : 50;
24
+ unset($filters['page'], $filters['limit']);
25
+ $collection->setPage($pageNum, $pageSize);
26
+
27
+ try {
28
+ foreach ($filters as $field => $value) {
29
+ $collection->addFieldToFilter($field, $value);
30
+ }
31
+ } catch (Mage_Core_Exception $e) {
32
+ $this->_fault('filters_invalid', $e->getMessage());
33
+ }
34
+
35
+ $result = array();
36
+
37
+ Mage::getSingleton('cataloginventory/stock_item')->addCatalogInventoryToProductCollection($collection);
38
+
39
+ foreach ($collection as $product) {
40
+ $data = array(
41
+ 'product_id' => $product->getId(),
42
+ 'sku' => $product->getSku(),
43
+ 'name' => $product->getName(),
44
+ 'set' => $product->getAttributeSetId(),
45
+ 'type' => $product->getTypeId(),
46
+ 'visibility' => $product->getVisibility(),
47
+ 'category_ids' => $product->getCategoryIds(),
48
+ 'image_url' => $product->getImageUrl(),
49
+ 'sb_configurable_parent_product_ids' => array(),
50
+ 'sb_configurable_child_product_ids' => array(),
51
+ 'sb_grouped_child_product_ids' => array(),
52
+ );
53
+
54
+ if ($product->isConfigurable()) {
55
+ $child_product_ids = $product->getTypeInstance()->getUsedProductIds();
56
+ $data['sb_configurable_child_product_ids'] = $child_product_ids;
57
+ } elseif ($product->isGrouped()) {
58
+ $child_product_ids = $product->getTypeInstance()->getAssociatedProductIds();
59
+ $data['sb_grouped_child_product_ids'] = $child_product_ids;
60
+ } else {
61
+ $parent_ids = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($product->getId());
62
+ $data['sb_configurable_parent_product_ids'] = $parent_ids;
63
+ }
64
+
65
+ $result[] = $this->infoResult($data, $product);;
66
+ }
67
+ return $result;
68
+ }
69
+
70
+ public function infoResult($result, $product, $attributes = array(), $store = null, $all_attributes = true)
71
+ {
72
+ $productId = $product->getId();
73
+
74
+ if (in_array('description', $attributes) || $all_attributes) {
75
+ $result['description'] = $product->setStoreId($store)->getDescription();
76
+ }
77
+
78
+ if (in_array('price', $attributes) || $all_attributes) {
79
+ $result['price'] = $product->setStoreId($store)->getPrice();
80
+ }
81
+
82
+ if (in_array('weight', $attributes) || $all_attributes) {
83
+ $result['weight'] = $product->setStoreId($store)->getWeight();
84
+ }
85
+
86
+ if (in_array('status', $attributes) || $all_attributes) {
87
+ $result['status'] = $product->setStoreId($store)->getStatus();
88
+ }
89
+
90
+ if (in_array('stock_data', $attributes) || $all_attributes) {
91
+ $result['stock_data'] = Mage::getSingleton('Mage_CatalogInventory_Model_Stock_Item_Api')->items($productId);
92
+ }
93
+
94
+ if (in_array('images', $attributes) || $all_attributes) {
95
+ $result['images'] = Mage::getSingleton('Mage_Catalog_Model_Product_Attribute_Media_Api')->items(
96
+ $productId,
97
+ $store
98
+ );
99
+ }
100
+
101
+ if ($product->isConfigurable()) {
102
+ $attributesData = $product->getTypeInstance()->getConfigurableAttributesAsArray();
103
+ // configurable_options
104
+ if (in_array('sb_configurable_attributes_data', $attributes) || $all_attributes) {
105
+ $options = array();
106
+ $k = 0;
107
+ foreach ($attributesData as $attribute) {
108
+ $options[$k]['code'] = $attribute['attribute_code'];
109
+ foreach ($attribute['values'] as $value) {
110
+ $value['attribute_code'] = $attribute['attribute_code'];
111
+ $options[$k]['options'][] = $value;
112
+ }
113
+ $k++;
114
+ }
115
+ $result['sb_configurable_attributes_data'] = $options;
116
+ // children
117
+ // @todo use $childProducts = $product->getTypeInstance()->getUsedProducts();
118
+ $childProducts = Mage::getModel('catalog/product_type_configurable')
119
+ ->getUsedProducts(null, $product);
120
+ $skus = array();
121
+ $i = 0;
122
+ foreach ($childProducts as $childProduct) {
123
+ $skus[$i]['product_id'] = $childProduct->getId();
124
+ $skus[$i]['sku'] = $childProduct->getSku();
125
+ $j = 0;
126
+ foreach ($attributesData as $attribute) {
127
+ $skus[$i]['options'][$j]['label'] = $attribute['label'];
128
+ $skus[$i]['options'][$j]['attribute_code'] = $attribute['attribute_code'];
129
+ $skus[$i]['options'][$j]['value_index'] = $childProduct[$attribute['attribute_code']];
130
+ $skus[$i]['options'][$j]['value_text'] = $childProduct->getAttributeText($attribute['attribute_code']);
131
+ $j++;
132
+ }
133
+ $i++;
134
+ }
135
+ $result['sb_configurable_products_data'] = $skus;
136
+ }
137
+ }
138
+
139
+ return $result;
140
+ }
141
+ }
app/code/community/Sellbrite/Api/Model/Catalog/Product/Api/V2.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Product list API V2
4
+ * Class Sellbrite_Api_Model_Catalog_Product_Api_V2
5
+ */
6
+ class Sellbrite_Api_Model_Catalog_Product_Api_V2 extends Sellbrite_Api_Model_Catalog_Product_Api
7
+ {
8
+ }
app/code/community/Sellbrite/Api/Model/Catalog/Product/Format/ProductType/Configurable.php DELETED
@@ -1,71 +0,0 @@
1
- <?php
2
- /**
3
- * Class Sellbrite_Api_Model_Catalog_Product_Format_ProductType_Configurable
4
- *
5
- * REST API output format decorator for Configurable product type
6
- */
7
- class Sellbrite_Api_Model_Catalog_Product_Format_ProductType_Configurable
8
- {
9
- /**
10
- * Extend product item data with variations information
11
- *
12
- * @param array $productData
13
- * @return array
14
- */
15
- public function apply($productData)
16
- {
17
- /** @var Mage_Catalog_Model_Product $product */
18
- $product = Mage::getModel('catalog/product')->load($productData['entity_id']);
19
- /** @var Mage_Catalog_Model_Product_Type_Configurable $typeInstance */
20
- $typeInstance = $product->getTypeInstance();
21
- $attributes = $typeInstance->getConfigurableAttributesAsArray($product);
22
- $variationKeys = array_map(
23
- function ($item) {
24
- return $item['attribute_code'];
25
- },
26
- $attributes
27
- );
28
- $variationPrices = array();
29
- foreach ($attributes as $attribute) {
30
- foreach ($attribute['values'] as $value) {
31
- $variationPrices[$value['value_index']] = array(
32
- 'price' => $value['pricing_value'],
33
- 'is_percent' => $value['is_percent']
34
- );
35
- }
36
- }
37
- $productData['variation_keys'] = $variationKeys;
38
- $variations = array_map(
39
- function (Mage_Catalog_Model_Product $productItem) use ($variationKeys, $variationPrices, $product) {
40
- $result = array(
41
- 'entity_id' => $productItem->getId(),
42
- 'sku' => $productItem->getSku(),
43
- 'price' => 0,
44
- );
45
- foreach ($variationKeys as $key) {
46
- $result['variation_fields'][$key] = $productItem->getAttributeText($key);
47
- $priceKey = $productItem->getData($key);
48
- if (isset($variationPrices[$priceKey])) {
49
- $priceData = $variationPrices[$priceKey];
50
- if ($priceData['is_percent']) {
51
- $optionPrice = $product->getFinalPrice() * ($priceData['price'] / 100.00);
52
- } else {
53
- $optionPrice = $priceData['price'];
54
- }
55
- $result['price'] += $optionPrice;
56
- }
57
- }
58
- $result['price'] += $product->getFinalPrice();
59
-
60
- /** @var Mage_CatalogInventory_Model_Stock_Item $stock */
61
- $stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($productItem);
62
- $result['quantity'] = $stock->getQty();
63
- return $result;
64
- },
65
- $typeInstance->getUsedProducts(null, $product)
66
- );
67
- $productData['variations'] = $variationPrices;
68
- $productData['variations'] = $variations;
69
- return $productData;
70
- }
71
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Sellbrite/Api/Model/Catalog/Product/Plugin.php DELETED
@@ -1,40 +0,0 @@
1
- <?php
2
- /**
3
- * Class Sellbrite_Api_Model_Catalog_Product_Plugin
4
- *
5
- * How To Extend a Logic of This Class?
6
- *
7
- * This class is designed as a Plugin for Mage_Catalog_Model_Api2_Product_Rest_Admin_V1 model
8
- * Decorates REST API output format for all product types.
9
- *
10
- * If you need to add/override output decorator for any product type, please, add configuration to the config.xml file
11
- * in the following format:
12
- * <config>
13
- * <global>
14
- * <compositions>
15
- * <product_type_plugin>
16
- * <{product_type_id}>namespace_module/class_name</{product_type_id}>
17
- * </product_type_plugin>
18
- * </compositions>
19
- * </global>
20
- * </config>
21
- *
22
- * where {product_type_id} - Product Type Code: simple, configurable, grouped, virtual, etc...
23
- */
24
- class Sellbrite_Api_Model_Catalog_Product_Plugin
25
- {
26
- /**
27
- * Customize output product format
28
- *
29
- * @param array $item
30
- * @return array
31
- */
32
- public function invokeAfter(array $item)
33
- {
34
- $composition = Mage::getConfig()->getNode('global/compositions/product_type_plugin')->asArray();
35
- if (isset($composition[$item['type_id']])) {
36
- $item = Mage::getSingleton($composition[$item['type_id']])->apply($item);
37
- }
38
- return $item;
39
- }
40
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Sellbrite/Api/Model/Catalog/ProductCollection/Plugin.php DELETED
@@ -1,43 +0,0 @@
1
- <?php
2
- /**
3
- * Class Sellbrite_Api_Model_Catalog_ProductCollection_Plugin
4
- *
5
- * How To Extend a Logic of This Class?
6
- *
7
- * This class is designed as a Plugin for Mage_Catalog_Model_Api2_Product_Rest_Admin_V1 model
8
- * Decorates REST API output format for all product types.
9
- *
10
- * If you need to add/override output decorator for any product type, please, add configuration to the config.xml file
11
- * in the following format:
12
- * <config>
13
- * <global>
14
- * <compositions>
15
- * <product_type_plugin>
16
- * <{product_type_id}>namespace_module/class_name</{product_type_id}>
17
- * </product_type_plugin>
18
- * </compositions>
19
- * </global>
20
- * </config>
21
- *
22
- * where {product_type_id} - Product Type Code: simple, configurable, grouped, virtual, etc...
23
- */
24
- class Sellbrite_Api_Model_Catalog_ProductCollection_Plugin
25
- {
26
- /**
27
- * Customize output product format
28
- *
29
- * @param array $result
30
- * @return array
31
- */
32
- public function invokeAfter(array $result)
33
- {
34
- $composition = Mage::getConfig()->getNode('global/compositions/product_type_plugin')->asArray();
35
-
36
- foreach ($result as &$item) {
37
- if (isset($composition[$item['type_id']])) {
38
- $item = Mage::getSingleton($composition[$item['type_id']])->apply($item);
39
- }
40
- }
41
- return $result;
42
- }
43
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Sellbrite/Api/Model/Credentials.php CHANGED
@@ -22,34 +22,6 @@ class Sellbrite_Api_Model_Credentials
22
  */
23
  protected $apiKey;
24
 
25
- /**
26
- * Merchant site URL
27
- *
28
- * @var string
29
- */
30
- protected $siteURL;
31
-
32
- /**
33
- * Consumer key
34
- *
35
- * @var string
36
- */
37
- protected $consumerKey;
38
-
39
- /**
40
- * Consumer secret
41
- *
42
- * @var string
43
- */
44
- protected $consumerSecret;
45
-
46
- /**
47
- * Get access token
48
- *
49
- * @var string
50
- */
51
- protected $accessToken;
52
-
53
  /**
54
  * Get SOAP user
55
  *
@@ -57,40 +29,12 @@ class Sellbrite_Api_Model_Credentials
57
  */
58
  protected $soapUser;
59
 
60
- /**
61
- * Get access secret
62
- *
63
- * @var string
64
- */
65
- protected $accessSecret;
66
-
67
  public function __construct()
68
  {
69
  $this->apiKey = Mage::getStoreConfig('sellbrite_api/config/api_key');
70
- $this->siteURL = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
71
-
72
  $apiUser = Mage::getModel('api/user');
73
  $apiUser->loadByUsername(self::AUTH_NAME);
74
  $this->soapUser = $apiUser->getUsername();
75
-
76
- /** @var $consumer Mage_Oauth_Model_Consumer */
77
- $consumer = Mage::getModel('oauth/consumer');
78
- $consumer->load(self::AUTH_NAME, 'name');
79
- $this->consumerKey = $consumer->getKey();
80
- $this->consumerSecret = $consumer->getSecret();
81
-
82
- /** @var Mage_Admin_Model_User $adminUser */
83
- $adminUser = Mage::getModel('admin/user');
84
- $adminUser->loadByUsername(self::AUTH_NAME);
85
-
86
- /** @var Mage_Oauth_Model_Resource_Token_Collection $collection */
87
- $collection = Mage::getResourceModel('oauth/token_collection');
88
- $collection->addFilterByAdminId((int) $adminUser->getId());
89
- $collection->addFilterByConsumerId((int) $consumer->getId());
90
- /** @var Mage_Oauth_Model_Token $token */
91
- $token = $collection->getFirstItem();
92
- $this->accessToken = $token->getToken();
93
- $this->accessSecret = $token->getSecret();
94
  $this->endPointURL = (string) Mage::getConfig()->getNode('default/sellbrite_endpoint_url');
95
  }
96
 
@@ -114,16 +58,6 @@ class Sellbrite_Api_Model_Credentials
114
  return $this->soapUser;
115
  }
116
 
117
- /**
118
- * Get site URL
119
- *
120
- * @return string
121
- */
122
- public function getSiteURL()
123
- {
124
- return $this->siteURL;
125
- }
126
-
127
  /**
128
  * Get end point URL
129
  *
@@ -133,44 +67,4 @@ class Sellbrite_Api_Model_Credentials
133
  {
134
  return $this->endPointURL;
135
  }
136
-
137
- /**
138
- * Get consumer key
139
- *
140
- * @return string
141
- */
142
- public function getConsumerKey()
143
- {
144
- return $this->consumerKey;
145
- }
146
-
147
- /**
148
- * Get consumer secret
149
- *
150
- * @return string
151
- */
152
- public function getConsumerSecret()
153
- {
154
- return $this->consumerSecret;
155
- }
156
-
157
- /**
158
- * Get access secret
159
- *
160
- * @return string
161
- */
162
- public function getAccessSecret()
163
- {
164
- return $this->accessSecret;
165
- }
166
-
167
- /**
168
- * Get access key
169
- *
170
- * @return string
171
- */
172
- public function getAccessToken()
173
- {
174
- return $this->accessToken;
175
- }
176
  }
22
  */
23
  protected $apiKey;
24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  /**
26
  * Get SOAP user
27
  *
29
  */
30
  protected $soapUser;
31
 
 
 
 
 
 
 
 
32
  public function __construct()
33
  {
34
  $this->apiKey = Mage::getStoreConfig('sellbrite_api/config/api_key');
 
 
35
  $apiUser = Mage::getModel('api/user');
36
  $apiUser->loadByUsername(self::AUTH_NAME);
37
  $this->soapUser = $apiUser->getUsername();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  $this->endPointURL = (string) Mage::getConfig()->getNode('default/sellbrite_endpoint_url');
39
  }
40
 
58
  return $this->soapUser;
59
  }
60
 
 
 
 
 
 
 
 
 
 
 
61
  /**
62
  * Get end point URL
63
  *
67
  {
68
  return $this->endPointURL;
69
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  }
app/code/community/Sellbrite/Api/Model/Resource/Token.php DELETED
@@ -1,33 +0,0 @@
1
- <?php
2
- /**
3
- * Class Sellbrite_Api_Model_Resource_Token
4
- */
5
- class Sellbrite_Api_Model_Resource_Token extends Mage_Oauth_Model_Resource_Token
6
- {
7
- /**
8
- * Retrieve oauth token using customer id
9
- *
10
- * @param Mage_Oauth_Model_Token $token
11
- * @return Mage_Oauth_Model_Token
12
- */
13
- public function getTokenForCustomer(Mage_Oauth_Model_Token $token)
14
- {
15
- if (!$token->getId() || !$token->getCustomerId()) {
16
- //return original data
17
- return $token;
18
- }
19
- $_oldCallbackUrl = $token->getCallbackUrl();
20
- $select = $this->_getWriteAdapter()->select()
21
- ->from($this->getMainTable(), array('entity_id'))
22
- ->where('authorized = 1')
23
- ->where('type = ?', 'access')
24
- ->where('entity_id <> ?', $token->getId())
25
- ->where('customer_id = ?', $token->getCustomerId());
26
- $tokenId = $this->_getWriteAdapter()->fetchOne($select);
27
- if ($tokenId) {
28
- $this->load($token,$tokenId);
29
- $token->setCallbackUrl($_oldCallbackUrl);
30
- }
31
- return $this;
32
- }
33
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Sellbrite/Api/Model/Token.php DELETED
@@ -1,78 +0,0 @@
1
- <?php
2
- /**
3
- * Class Sellbrite_Api_Model_Token
4
- *
5
- * @method Sellbrite_Api_Model_Resource_Token getResource
6
- */
7
- class Sellbrite_Api_Model_Token extends Mage_Oauth_Model_Token
8
- {
9
- /**
10
- * Authorize token
11
- *
12
- * @param int $userId Authorization user identifier
13
- * @param string $userType Authorization user type
14
- * @return Mage_Oauth_Model_Token
15
- */
16
- public function authorize($userId, $userType)
17
- {
18
- if (!$this->getId() || !$this->getConsumerId()) {
19
- Mage::throwException('Token is not ready to be authorized');
20
- }
21
- if ($this->getAuthorized()) {
22
- Mage::throwException('Token is already authorized');
23
- }
24
- if (self::USER_TYPE_ADMIN == $userType) {
25
- $this->setAdminId($userId);
26
- } elseif (self::USER_TYPE_CUSTOMER == $userType) {
27
- $this->setCustomerId($userId);
28
- } else {
29
- Mage::throwException('User type is unknown');
30
- }
31
- /** @var $helper Mage_Oauth_Helper_Data */
32
- $helper = Mage::helper('oauth');
33
- if ($this->getCustomerId()) {
34
- /**
35
- * override parent logic not to return different token for the same customer account
36
- */
37
- $this->getResource()->getTokenForCustomer($this);
38
- }
39
- if (!$this->getCustomerId() || ($this->getCustomerId() && $this->getType() != self::TYPE_ACCESS)) {
40
- $this->setVerifier($helper->generateVerifier());
41
- }
42
-
43
- $this->setAuthorized(1);
44
- $this->save();
45
- $this->getResource()->cleanOldAuthorizedTokensExcept($this);
46
-
47
- return $this;
48
- }
49
-
50
- /**
51
- * Convert token to access type
52
- *
53
- * @return Mage_Oauth_Model_Token
54
- */
55
- public function convertToAccess()
56
- {
57
- /**
58
- * customization to allow the same token for difference devices
59
- */
60
- if ($this->getType() != self::TYPE_ACCESS && self::TYPE_REQUEST != $this->getType()) {
61
- Mage::throwException('Can not convert due to token is not request type');
62
- }
63
-
64
- /** @var $helper Mage_Oauth_Helper_Data */
65
- $helper = Mage::helper('oauth');
66
- /**
67
- * customization to allow the same token
68
- * we will only save when it is a new token
69
- */
70
- if ($this->getType() != self::TYPE_ACCESS) {
71
- $this->setType(self::TYPE_ACCESS);
72
- $this->setToken($helper->generateToken());
73
- $this->setSecret($helper->generateTokenSecret());
74
- $this->save();
75
- }
76
- return $this;
77
- }
78
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Sellbrite/Api/data/sellbrite_setup/data-install-1.1.0.php CHANGED
@@ -2,117 +2,12 @@
2
  /**
3
  * Install Sellbrite API data fixtures
4
  * Required entities:
5
- * - Consumer APP
6
- * - Grand Admin user type with ALL privileges
7
- * - Rest Role with all privileges granted
8
- * - Rest User
9
- * - Access Token
10
  */
11
-
12
- //I. Create REST API Credentials
13
- $chars = Mage_Core_Helper_Data::CHARS_PASSWORD_LOWERS
14
- . Mage_Core_Helper_Data::CHARS_PASSWORD_UPPERS
15
- . Mage_Core_Helper_Data::CHARS_PASSWORD_DIGITS
16
- . Mage_Core_Helper_Data::CHARS_PASSWORD_SPECIALS;
17
- /** @var $helper Mage_Oauth_Helper_Data */
18
- $helper = Mage::helper('oauth');
19
- /** @var Mage_Core_Helper_Data $generator */
20
- $generator = Mage::helper('core');
21
-
22
  //======================= Predefined values ======================//
23
  $authName = Sellbrite_Api_Model_Credentials::AUTH_NAME;
24
  $adminEmail = 'magento@sellbrite.com';
25
- $callBackURL = Mage::getBaseUrl();
26
- $adminPassword = $generator->getRandomString(8, $chars);
27
  //================================================================//
28
-
29
- /** 1. Create consumer app in Magento */
30
- /** @var $consumer Mage_Oauth_Model_Consumer */
31
- $consumer = Mage::getModel('oauth/consumer');
32
- $consumer->load($authName, 'name');
33
- if (!$consumer->getId()) {
34
- $consumer->setKey($helper->generateConsumerKey());
35
- $consumer->setSecret($helper->generateConsumerSecret());
36
- $consumer->setName($authName);
37
- $consumer->save();
38
- }
39
-
40
- /** 2. Update REST admin attributes to have access to All */
41
- /** @var $attribute Mage_Api2_Model_Acl_Filter_Attribute */
42
- $attribute = Mage::getModel('api2/acl_filter_attribute');
43
- /** @var $collection Mage_Api2_Model_Resource_Acl_Filter_Attribute_Collection */
44
- $collection = $attribute->getCollection();
45
- //Clean up existing resources if any
46
- $collection->addFilterByUserType('admin');
47
- /** @var $model Mage_Api2_Model_Acl_Filter_Attribute */
48
- foreach ($collection as $model) {
49
- $model->delete();
50
- }
51
- $attribute->setUserType('admin');
52
- $attribute->setResourceId(Mage_Api2_Model_Acl_Global_Rule::RESOURCE_ALL);
53
- $attribute->save();
54
-
55
- /** 3. Create REST role with all permissions */
56
-
57
- /** @var $role Mage_Api2_Model_Acl_Global_Role */
58
- $role = Mage::getModel('api2/acl_global_role');
59
- $role->load($authName, 'role_name');
60
- if (!$role->getId()) {
61
- $role->setRoleName($authName);
62
- $role->save();
63
- } else {
64
- //Remove existing rule if any
65
- /** @var Mage_Api2_Model_Resource_Acl_Global_Rule_Collection $ruleCollection */
66
- $ruleCollection = Mage::getResourceModel('api2/acl_global_rule_collection');
67
- $ruleCollection->addFilterByRoleId($role->getId());
68
- /** @var $ruleModel Mage_Api2_Model_Acl_Global_Rule */
69
- foreach ($collection as $ruleModel) {
70
- $ruleModel->delete();
71
- }
72
- }
73
- //Create new rule
74
- /** @var $rule Mage_Api2_Model_Acl_Global_Rule */
75
- $rule = Mage::getModel('api2/acl_global_rule');
76
- $rule->setRoleId($role->getId());
77
- $rule->setResourceId(Mage_Api2_Model_Acl_Global_Rule::RESOURCE_ALL);
78
- $rule->save();
79
-
80
- /** 4. Create admin user and associate with REST role */
81
- /** @var Mage_Admin_Model_User $adminUser */
82
- $adminUser = Mage::getModel('admin/user');
83
- $adminUser->loadByUsername($authName);
84
- if (!$adminUser->getId()) {
85
- $adminUser->setUsername($authName);
86
- $adminUser->setFirstname($authName);
87
- $adminUser->setLastname($authName);
88
- $adminUser->setEmail($adminEmail);
89
- $adminUser->setPassword($adminPassword);
90
- $adminUser->setIsActive(1);
91
- $adminUser->save();
92
- }
93
-
94
- /** @var $resourceModel Mage_Api2_Model_Resource_Acl_Global_Role */
95
- $resourceModel = Mage::getResourceModel('api2/acl_global_role');
96
- //Create/update relation row of admin user to API2 role
97
- $resourceModel->saveAdminToRoleRelation($adminUser->getId(), $role->getId());
98
-
99
-
100
- /** 5. Associate this admin user to work with the created app */
101
- /** @var Mage_Oauth_Model_Token $token */
102
- $token = Mage::getModel('oauth/token');
103
- $token->setConsumerId($consumer->getId());
104
- $token->setAdminId($adminUser->getId());
105
- $token->setType(Mage_Oauth_Model_Token::TYPE_ACCESS);
106
- $token->setToken($helper->generateToken());
107
- $token->setSecret($helper->generateTokenSecret());
108
- $token->setCallbackUrl($callBackURL);
109
- $token->setVerifier($helper->generateVerifier());
110
- $token->setAuthorized(1);
111
- $token->save();
112
-
113
- //Clean up old authorized tokens for specified consumer-user pairs
114
- $token->getResource()->cleanOldAuthorizedTokensExcept($token);
115
-
116
  //II. Create SOAP API Credentials
117
  //1. Generate API key
118
  $apiKey = Mage::getStoreConfig('sellbrite_api/config/api_key');
2
  /**
3
  * Install Sellbrite API data fixtures
4
  * Required entities:
5
+ * - SOAP API USE
 
 
 
 
6
  */
 
 
 
 
 
 
 
 
 
 
 
7
  //======================= Predefined values ======================//
8
  $authName = Sellbrite_Api_Model_Credentials::AUTH_NAME;
9
  $adminEmail = 'magento@sellbrite.com';
 
 
10
  //================================================================//
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  //II. Create SOAP API Credentials
12
  //1. Generate API key
13
  $apiKey = Mage::getStoreConfig('sellbrite_api/config/api_key');
app/code/community/Sellbrite/Api/etc/api.xml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <api>
4
+ <resources>
5
+ <sellbrite_product translate="title" module="sellbrite_api">
6
+ <title>Product API</title>
7
+ <model>sellbrite_api/catalog_product_api</model>
8
+ <acl>sellbrite/catalog/product</acl>
9
+ <methods>
10
+ <list translate="title" module="sellbrite_api">
11
+ <title>Retrieve products list by filters</title>
12
+ <method>items</method>
13
+ <acl>sellbrite/catalog/product/list</acl>
14
+ </list>
15
+ </methods>
16
+ </sellbrite_product>
17
+ </resources>
18
+ <v2>
19
+ <resources_function_prefix>
20
+ <sellbrite_product>sellbriteProduct</sellbrite_product>
21
+ </resources_function_prefix>
22
+ </v2>
23
+ <acl>
24
+ <resources>
25
+ <sellbrite_api translate="title" module="sellbrite_api">
26
+ <title>Sellbrite API</title>
27
+ <product translate="title" module="sellbrite_api">
28
+ <title>Product</title>
29
+ <sort_order>0</sort_order>
30
+ <list translate="title" module="sellbrite_api">
31
+ <title>List</title>
32
+ </list>
33
+ </product>
34
+ </sellbrite_api>
35
+ </resources>
36
+ </acl>
37
+ </api>
38
+ </config>
app/code/community/Sellbrite/Api/etc/api2.xml DELETED
@@ -1,19 +0,0 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <api2>
4
- <resources>
5
- <product translate="title" module="api2">
6
- <attributes translate="variations variation_keys" module="sellbrite_api">
7
- <variations>Product Variations</variations>
8
- <variation_keys>Product Variation Keys</variation_keys>
9
- </attributes>
10
- </product>>
11
- <order>
12
- <attributes translate="updated_at state" module="sellbrite_api">
13
- <updated_at>Order Update Date</updated_at>
14
- <state>Order State</state>
15
- </attributes>
16
- </order>
17
- </resources>
18
- </api2>
19
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Sellbrite/Api/etc/config.xml CHANGED
@@ -19,21 +19,6 @@
19
  <sellbrite_api_resource>
20
  <class>Sellbrite_Api_Model_Resource</class>
21
  </sellbrite_api_resource>
22
- <oauth>
23
- <rewrite>
24
- <token>Sellbrite_Api_Model_Token</token>
25
- </rewrite>
26
- </oauth>
27
- <oauth_resource>
28
- <rewrite>
29
- <token>Sellbrite_Api_Model_Resource_Token</token>
30
- </rewrite>
31
- </oauth_resource>
32
- <catalog>
33
- <rewrite>
34
- <api2_product_rest_admin_v1>Sellbrite_Api_Model_Catalog_Api2_Product_Rest_Admin_V1_Interceptor</api2_product_rest_admin_v1>
35
- </rewrite>
36
- </catalog>
37
  </models>
38
  <blocks>
39
  <sellbrite_api>
@@ -47,39 +32,8 @@
47
  </setup>
48
  </sellbrite_setup>
49
  </resources>
50
- <catalog_product_list_item_plugins>
51
- <!--
52
- Plugins configuration format:
53
- <method_name>
54
- <before|after|around>
55
- <some_plugin_class_name>module/class_name</some_plugin_class_name>
56
- </before|after|around>
57
- </method_name>
58
- -->
59
- <_retrieveCollection>
60
- <after>
61
- <product_type_plugin>sellbrite_api/catalog_productCollection_plugin</product_type_plugin>
62
- </after>
63
- </_retrieveCollection>
64
- <_retrieve>
65
- <after>
66
- <product_type_plugin>sellbrite_api/catalog_product_plugin</product_type_plugin>
67
- </after>
68
- </_retrieve>
69
- </catalog_product_list_item_plugins>
70
- <compositions>
71
- <!--
72
- Composition configuration format:
73
- <some_plugin_class_name> - reference to plugins configuration
74
- <some_item_name>module/class_name</some_item_name>
75
- </some_plugin_class_name>
76
- -->
77
- <product_type_plugin>
78
- <configurable>sellbrite_api/catalog_product_format_productType_configurable</configurable>
79
- </product_type_plugin>
80
- </compositions>
81
  </global>
82
  <default>
83
  <sellbrite_endpoint_url>https://app.sellbrite.com/merchants/magento/init</sellbrite_endpoint_url>
84
  </default>
85
- </config>
19
  <sellbrite_api_resource>
20
  <class>Sellbrite_Api_Model_Resource</class>
21
  </sellbrite_api_resource>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  </models>
23
  <blocks>
24
  <sellbrite_api>
32
  </setup>
33
  </sellbrite_setup>
34
  </resources>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  </global>
36
  <default>
37
  <sellbrite_endpoint_url>https://app.sellbrite.com/merchants/magento/init</sellbrite_endpoint_url>
38
  </default>
39
+ </config>
app/code/community/Sellbrite/Api/etc/wsdl.xml ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <definitions xmlns:typens="urn:{{var wsdl.name}}" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
3
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
4
+ xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
5
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
6
+ name="{{var wsdl.name}}" targetNamespace="urn:{{var wsdl.name}}">
7
+ <types>
8
+ <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Magento">
9
+ <import namespace="http://schemas.xmlsoap.org/soap/encoding/"
10
+ schemaLocation="http://schemas.xmlsoap.org/soap/encoding/"/>
11
+ <complexType name="sellbriteProductListEntity">
12
+ <all>
13
+ <element name="product_id" type="xsd:string" minOccurs="0"/>
14
+ <element name="sku" type="xsd:string" minOccurs="0"/>
15
+ <element name="set" type="xsd:string" minOccurs="0"/>
16
+ <element name="type" type="xsd:string" minOccurs="0"/>
17
+ <element name="categories" type="typens:ArrayOfString" minOccurs="0"/>
18
+ <element name="websites" type="typens:ArrayOfString" minOccurs="0"/>
19
+ <element name="created_at" type="xsd:string" minOccurs="0"/>
20
+ <element name="updated_at" type="xsd:string" minOccurs="0"/>
21
+ <element name="type_id" type="xsd:string" minOccurs="0"/>
22
+ <element name="name" type="xsd:string" minOccurs="0"/>
23
+ <element name="description" type="xsd:string" minOccurs="0"/>
24
+ <element name="short_description" type="xsd:string" minOccurs="0"/>
25
+ <element name="weight" type="xsd:string" minOccurs="0"/>
26
+ <element name="status" type="xsd:string" minOccurs="0"/>
27
+ <element name="url_key" type="xsd:string" minOccurs="0"/>
28
+ <element name="url_path" type="xsd:string" minOccurs="0"/>
29
+ <element name="visibility" type="xsd:string" minOccurs="0"/>
30
+ <element name="category_ids" type="typens:ArrayOfString" minOccurs="0"/>
31
+ <element name="website_ids" type="typens:ArrayOfString" minOccurs="0"/>
32
+ <element name="has_options" type="xsd:string" minOccurs="0"/>
33
+ <element name="gift_message_available" type="xsd:string" minOccurs="0"/>
34
+ <element name="price" type="xsd:string" minOccurs="0"/>
35
+ <element name="special_price" type="xsd:string" minOccurs="0"/>
36
+ <element name="special_from_date" type="xsd:string" minOccurs="0"/>
37
+ <element name="special_to_date" type="xsd:string" minOccurs="0"/>
38
+ <element name="tax_class_id" type="xsd:string" minOccurs="0"/>
39
+ <element name="tier_price" type="typens:catalogProductTierPriceEntityArray" minOccurs="0"/>
40
+ <element name="meta_title" type="xsd:string" minOccurs="0"/>
41
+ <element name="meta_keyword" type="xsd:string" minOccurs="0"/>
42
+ <element name="meta_description" type="xsd:string" minOccurs="0"/>
43
+ <element name="custom_design" type="xsd:string" minOccurs="0"/>
44
+ <element name="custom_layout_update" type="xsd:string" minOccurs="0"/>
45
+ <element name="options_container" type="xsd:string" minOccurs="0"/>
46
+ <element name="image_url" type="xsd:string" minOccurs="0"/>
47
+ <element name="qty" type="xsd:string" minOccurs="0"/>
48
+ <element name="additional_attributes" type="typens:associativeArray" minOccurs="0"/>
49
+
50
+ <element name="sb_configurable_parent_product_ids" type="typens:ArrayOfString" minOccurs="0"/>
51
+ <element name="sb_configurable_child_product_ids" type="typens:ArrayOfString" minOccurs="0"/>
52
+ <element name="sb_configurable_products_data" type="typens:childrenEntityArray" minOccurs="0"/>
53
+ <element name="sb_configurable_attributes_data" type="typens:configurableOptionsEntityArray"
54
+ minOccurs="0"/>
55
+
56
+ <element name="sb_grouped_child_product_ids" type="typens:ArrayOfString" minOccurs="0"/>
57
+
58
+ <element name="stock_data" type="typens:catalogInventoryStockItemEntityArray" minOccurs="0"/>
59
+ <element name="images" type="typens:catalogProductImageEntityArray" minOccurs="0"/>
60
+ </all>
61
+ </complexType>
62
+
63
+ <complexType name="childrenEntityArray">
64
+ <complexContent>
65
+ <restriction base="soapenc:Array">
66
+ <attribute ref="soapenc:arrayType" wsdl:arrayType="typens:childrenEntity[]"/>
67
+ </restriction>
68
+ </complexContent>
69
+ </complexType>
70
+ <complexType name="childrenEntity">
71
+ <all>
72
+ <element name="product_id" type="xsd:string" minOccurs="0"/>
73
+ <element name="sku" type="xsd:string" minOccurs="0"/>
74
+ <element name="options" type="typens:optionsEntityArray" minOccurs="0"/>
75
+ </all>
76
+ </complexType>
77
+ <complexType name="configurableOptionsEntityArray">
78
+ <complexContent>
79
+ <restriction base="soapenc:Array">
80
+ <attribute ref="soapenc:arrayType" wsdl:arrayType="typens:configurableOptionsEntity[]"/>
81
+ </restriction>
82
+ </complexContent>
83
+ </complexType>
84
+ <complexType name="configurableOptionsEntity">
85
+ <all>
86
+ <element name="code" type="xsd:string" minOccurs="0"/>
87
+ <element name="options" type="typens:optionsEntityArray" minOccurs="0"/>
88
+ </all>
89
+ </complexType>
90
+ <complexType name="optionsEntityArray">
91
+ <complexContent>
92
+ <restriction base="soapenc:Array">
93
+ <attribute ref="soapenc:arrayType" wsdl:arrayType="typens:optionsEntity[]"/>
94
+ </restriction>
95
+ </complexContent>
96
+ </complexType>
97
+ <complexType name="optionsEntity">
98
+ <all>
99
+ <element name="product_super_attribute_id" type="xsd:string" minOccurs="0"/>
100
+ <element name="value_index" type="xsd:string" minOccurs="0"/>
101
+ <element name="value_text" type="xsd:string" minOccurs="0"/>
102
+ <element name="label" type="xsd:string" minOccurs="0"/>
103
+ <element name="default_label" type="xsd:string" minOccurs="0"/>
104
+ <element name="store_label" type="xsd:string" minOccurs="0"/>
105
+ <element name="is_percent" type="xsd:int" minOccurs="0"/>
106
+ <element name="pricing_value" type="xsd:double" minOccurs="0"/>
107
+ <element name="use_default_value" type="xsd:boolean" minOccurs="0"/>
108
+ <element name="attribute_code" type="xsd:string" minOccurs="0"/>
109
+ </all>
110
+ </complexType>
111
+ <complexType name="sellbriteProductListEntityArray">
112
+ <complexContent>
113
+ <restriction base="soapenc:Array">
114
+ <attribute ref="soapenc:arrayType"
115
+ wsdl:arrayType="typens:sellbriteProductListEntity[]"/>
116
+ </restriction>
117
+ </complexContent>
118
+ </complexType>
119
+ </schema>
120
+ </types>
121
+
122
+ <message name="sellbriteProductListRequest">
123
+ <part name="sessionId" type="xsd:string"/>
124
+ <part name="filters" type="typens:filters"/>
125
+ </message>
126
+ <message name="sellbriteProductListResponse">
127
+ <part name="result" type="typens:sellbriteProductListEntityArray"/>
128
+ </message>
129
+
130
+ <portType name="{{var wsdl.handler}}PortType">
131
+ <operation name="sellbriteProductList">
132
+ <documentation>Retrieve products list by filters</documentation>
133
+ <input message="typens:sellbriteProductListRequest"/>
134
+ <output message="typens:sellbriteProductListResponse"/>
135
+ </operation>
136
+ </portType>
137
+
138
+ <binding name="{{var wsdl.handler}}Binding" type="typens:{{var wsdl.handler}}PortType">
139
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
140
+ <operation name="sellbriteProductList">
141
+ <soap:operation soapAction="urn:{{var wsdl.handler}}Action"/>
142
+ <input>
143
+ <soap:body namespace="urn:{{var wsdl.name}}" use="encoded"
144
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
145
+ </input>
146
+ <output>
147
+ <soap:body namespace="urn:{{var wsdl.name}}" use="encoded"
148
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
149
+ </output>
150
+ </operation>
151
+ </binding>
152
+
153
+ <service name="{{var wsdl.name}}Service">
154
+ <port name="{{var wsdl.handler}}Port" binding="typens:{{var wsdl.handler}}Binding">
155
+ <soap:address location="{{var wsdl.url}}"/>
156
+ </port>
157
+ </service>
158
+ </definitions>
app/code/community/Sellbrite/Api/etc/wsi.xml ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <wsdl:definitions xmlns:typens="urn:{{var wsdl.name}}"
3
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
4
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
5
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
6
+ name="{{var wsdl.name}}"
7
+ targetNamespace="urn:{{var wsdl.name}}">
8
+ <wsdl:types>
9
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:{{var wsdl.name}}">
10
+ <xsd:complexType name="sellbriteProductEntityArray">
11
+ <xsd:sequence>
12
+ <xsd:element minOccurs="0" maxOccurs="unbounded" name="complexObjectArray"
13
+ type="typens:sellbriteProductEntity"/>
14
+ </xsd:sequence>
15
+ </xsd:complexType>
16
+ <xsd:complexType name="sellbriteProductEntity">
17
+ <xsd:sequence>
18
+ <xsd:element name="product_id" type="xsd:string" minOccurs="0"/>
19
+ <xsd:element name="sku" type="xsd:string" minOccurs="0"/>
20
+ <xsd:element name="set" type="xsd:string" minOccurs="0"/>
21
+ <xsd:element name="type" type="xsd:string" minOccurs="0"/>
22
+ <xsd:element name="categories" type="typens:ArrayOfString" minOccurs="0"/>
23
+ <xsd:element name="websites" type="typens:ArrayOfString" minOccurs="0"/>
24
+ <xsd:element name="created_at" type="xsd:string" minOccurs="0"/>
25
+ <xsd:element name="updated_at" type="xsd:string" minOccurs="0"/>
26
+ <xsd:element name="type_id" type="xsd:string" minOccurs="0"/>
27
+ <xsd:element name="name" type="xsd:string" minOccurs="0"/>
28
+ <xsd:element name="description" type="xsd:string" minOccurs="0"/>
29
+ <xsd:element name="short_description" type="xsd:string" minOccurs="0"/>
30
+ <xsd:element name="weight" type="xsd:string" minOccurs="0"/>
31
+ <xsd:element name="status" type="xsd:string" minOccurs="0"/>
32
+ <xsd:element name="url_key" type="xsd:string" minOccurs="0"/>
33
+ <xsd:element name="url_path" type="xsd:string" minOccurs="0"/>
34
+ <xsd:element name="visibility" type="xsd:string" minOccurs="0"/>
35
+ <xsd:element name="category_ids" type="typens:ArrayOfString" minOccurs="0"/>
36
+ <xsd:element name="website_ids" type="typens:ArrayOfString" minOccurs="0"/>
37
+ <xsd:element name="has_options" type="xsd:string" minOccurs="0"/>
38
+ <xsd:element name="gift_message_available" type="xsd:string" minOccurs="0"/>
39
+ <xsd:element name="price" type="xsd:string" minOccurs="0"/>
40
+ <xsd:element name="special_price" type="xsd:string" minOccurs="0"/>
41
+ <xsd:element name="special_from_date" type="xsd:string" minOccurs="0"/>
42
+ <xsd:element name="special_to_date" type="xsd:string" minOccurs="0"/>
43
+ <xsd:element name="tax_class_id" type="xsd:string" minOccurs="0"/>
44
+ <xsd:element name="tier_price" type="typens:catalogProductTierPriceEntityArray" minOccurs="0"/>
45
+ <xsd:element name="meta_title" type="xsd:string" minOccurs="0"/>
46
+ <xsd:element name="meta_keyword" type="xsd:string" minOccurs="0"/>
47
+ <xsd:element name="meta_description" type="xsd:string" minOccurs="0"/>
48
+ <xsd:element name="custom_design" type="xsd:string" minOccurs="0"/>
49
+ <xsd:element name="custom_layout_update" type="xsd:string" minOccurs="0"/>
50
+ <xsd:element name="options_container" type="xsd:string" minOccurs="0"/>
51
+ <xsd:element name="image_url" type="xsd:string" minOccurs="0"/>
52
+ <xsd:element name="qty" type="xsd:string" minOccurs="0"/>
53
+ <xsd:element name="additional_attributes" type="typens:associativeArray" minOccurs="0"/>
54
+ <xsd:element name="sb_configurable_parent_product_ids" type="typens:ArrayOfString" minOccurs="0"/>
55
+ <xsd:element name="sb_configurable_child_product_ids" type="typens:ArrayOfString" minOccurs="0"/>
56
+ <xsd:element name="sb_configurable_products_data" type="typens:childrenEntityArray" minOccurs="0"/>
57
+ <xsd:element name="sb_configurable_attributes_data" type="typens:configurableOptionsEntityArray"
58
+ minOccurs="0"/>
59
+ <xsd:element name="sb_grouped_child_product_ids" type="typens:ArrayOfString" minOccurs="0"/>
60
+ <xsd:element name="stock_data" type="typens:catalogInventoryStockItemEntityArray" minOccurs="0"/>
61
+ <xsd:element name="images" type="typens:catalogProductImageEntityArray" minOccurs="0"/>
62
+ </xsd:sequence>
63
+ </xsd:complexType>
64
+ <xsd:complexType name="childrenEntityArray">
65
+ <xsd:sequence>
66
+ <xsd:element minOccurs="0" maxOccurs="unbounded" name="complexObjectArray" type="typens:childrenEntity" />
67
+ </xsd:sequence>
68
+ </xsd:complexType>
69
+ <xsd:complexType name="childrenEntity">
70
+ <xsd:sequence>
71
+ <xsd:element name="product_id" type="xsd:int" minOccurs="0" />
72
+ <xsd:element name="sku" type="xsd:string" minOccurs="0" />
73
+ <xsd:element minOccurs="0" maxOccurs="unbounded" name="complexObjectArray" type="typens:childrenEntityOptionsArray" />
74
+ </xsd:sequence>
75
+ </xsd:complexType>
76
+ <xsd:complexType name="childrenEntityOptionsArray">
77
+ <xsd:sequence>
78
+ <xsd:element minOccurs="0" maxOccurs="unbounded" name="complexObjectArray" type="typens:childrenEntityOptions" />
79
+ </xsd:sequence>
80
+ </xsd:complexType>
81
+ <xsd:complexType name="childrenEntityOptions">
82
+ <xsd:sequence>
83
+ <xsd:element name="label" type="xsd:string" minOccurs="0" />
84
+ <xsd:element name="attribute_code" type="xsd:string" minOccurs="0" />
85
+ <xsd:element name="value_index" type="xsd:string" minOccurs="0" />
86
+ <xsd:element name="value_text" type="xsd:string" minOccurs="0" />
87
+ </xsd:sequence>
88
+ </xsd:complexType>
89
+ <xsd:complexType name="configurableOptionsEntityArray">
90
+ <xsd:sequence>
91
+ <xsd:element minOccurs="0" maxOccurs="unbounded" name="complexObjectArray" type="typens:configurableOptionsEntity" />
92
+ </xsd:sequence>
93
+ </xsd:complexType>
94
+ <xsd:complexType name="configurableOptionsEntity">
95
+ <xsd:sequence>
96
+ <xsd:element name="code" type="xsd:string" minOccurs="0" />
97
+ <xsd:element name="options" type="typens:associativeArray" minOccurs="0"/>
98
+ </xsd:sequence>
99
+ </xsd:complexType>
100
+ <xsd:element name="sellbriteProductListRequestParam">
101
+ <xsd:complexType>
102
+ <xsd:sequence>
103
+ <xsd:element minOccurs="1" maxOccurs="1" name="sessionId" type="xsd:string"/>
104
+ <xsd:element minOccurs="0" maxOccurs="1" name="filters" type="typens:filters"/>
105
+ </xsd:sequence>
106
+ </xsd:complexType>
107
+ </xsd:element>
108
+ <xsd:element name="sellbriteProductListResponseParam">
109
+ <xsd:complexType>
110
+ <xsd:sequence>
111
+ <xsd:element minOccurs="0" maxOccurs="1" name="result"
112
+ type="typens:sellbriteProductEntityArray"/>
113
+ </xsd:sequence>
114
+ </xsd:complexType>
115
+ </xsd:element>
116
+ </xsd:schema>
117
+ </wsdl:types>
118
+ <wsdl:message name="sellbriteProductListRequest">
119
+ <wsdl:part name="parameters" element="typens:sellbriteProductListRequestParam"/>
120
+ </wsdl:message>
121
+ <wsdl:message name="sellbriteProductListResponse">
122
+ <wsdl:part name="parameters" element="typens:sellbriteProductListResponseParam"/>
123
+ </wsdl:message>
124
+ <wsdl:portType name="{{var wsdl.handler}}PortType">
125
+ <wsdl:operation name="sellbriteProductList">
126
+ <wsdl:documentation>Retrieve list of Products</wsdl:documentation>
127
+ <wsdl:input message="typens:sellbriteProductListRequest"/>
128
+ <wsdl:output message="typens:sellbriteProductListResponse"/>
129
+ </wsdl:operation>
130
+ </wsdl:portType>
131
+ <wsdl:binding name="{{var wsdl.handler}}Binding" type="typens:{{var wsdl.handler}}PortType">
132
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
133
+ <wsdl:operation name="sellbriteProductList">
134
+ <soap:operation soapAction=""/>
135
+ <wsdl:input>
136
+ <soap:body use="literal"/>
137
+ </wsdl:input>
138
+ <wsdl:output>
139
+ <soap:body use="literal"/>
140
+ </wsdl:output>
141
+ </wsdl:operation>
142
+ </wsdl:binding>
143
+ <wsdl:service name="{{var wsdl.name}}Service">
144
+ <wsdl:port name="{{var wsdl.handler}}Port" binding="typens:{{var wsdl.handler}}Binding">
145
+ <soap:address location="{{var wsdl.url}}"/>
146
+ </wsdl:port>
147
+ </wsdl:service>
148
+ </wsdl:definitions>
app/design/adminhtml/base/default/template/sellbrite/api/system/config/fieldset/hint.phtml CHANGED
@@ -11,7 +11,7 @@
11
  <br>
12
  <h2 style='color: red'>Sorry, but we don't currently support your Magento version.</h2>
13
  <b>Your Magento Version:</b> <code><?php echo $this->getMagentoVersion(); ?></code><br>
14
- <b>Supported Versions:</b> <code><?php echo $this->getMinVersion(); ?> - <?php echo $this->getMaxVersion(); ?></code><br><br>
15
 
16
  We are working hard to add support for more versions. So stay tuned!
17
 
@@ -23,14 +23,6 @@
23
  <div class="box">
24
  <div>
25
  <a href="https://www.sellbrite.com" target="_blank"><img src="http://sellbrite.com/wp-content/uploads/sellbrite-logo-300@2x1.png" height='50' alt="Sellbrite" title="Sellbrite" /></a><br>
26
-
27
- <fieldset>
28
- <h2>REST API Credentials</h2>
29
- <b>Consumer Key:</b> <code><?php echo $this->getConsumerKey(); ?></code><br><br>
30
- <b>Consumer Secret:</b> <code><?php echo $this->getConsumerSecret(); ?></code><br><br>
31
- <b>Access Token:</b> <code><?php echo $this->getAccessToken(); ?></code><br><br>
32
- <b>Access Secret:</b> <code><?php echo $this->getAccessSecret(); ?></code><br><br>
33
- </fieldset>
34
  <fieldset>
35
  <h2>SOAP API Credentials</h2>
36
  <b>Api User:</b> <code><?php echo $this->getSoapUser(); ?></code><br><br>
@@ -48,13 +40,10 @@
48
  document.observe('dom:loaded', function(){
49
  $('config_edit_form').insert({
50
  'after': '<form method="post" action="<?php echo $this->getEndPointUrl(); ?>" id="sellbrite_connection_form">'
51
- + '<input type="hidden" name="consumer_key" value="<?php echo $this->getConsumerKey(); ?>" />'
52
- + '<input type="hidden" name="consumer_secret" value="<?php echo $this->getConsumerSecret(); ?>" />'
53
- + '<input type="hidden" name="access_token" value="<?php echo $this->getAccessToken(); ?>" />'
54
- + '<input type="hidden" name="access_secret" value="<?php echo $this->getAccessSecret(); ?>" />'
55
  + '<input type="hidden" name="api_key" value="<?php echo $this->getApiKey(); ?>" />'
56
  + '<input type="hidden" name="api_user" value="<?php echo $this->getSoapUser(); ?>" />'
57
- + '<input type="hidden" name="site_url" value="<?php echo $this->getSiteURL(); ?>" />'
 
58
  + '</form>'
59
  });
60
  });
11
  <br>
12
  <h2 style='color: red'>Sorry, but we don't currently support your Magento version.</h2>
13
  <b>Your Magento Version:</b> <code><?php echo $this->getMagentoVersion(); ?></code><br>
14
+ <b>Minimum Supported Version:</b> <code><?php echo $this->getMinVersion(); ?></code><br><br>
15
 
16
  We are working hard to add support for more versions. So stay tuned!
17
 
23
  <div class="box">
24
  <div>
25
  <a href="https://www.sellbrite.com" target="_blank"><img src="http://sellbrite.com/wp-content/uploads/sellbrite-logo-300@2x1.png" height='50' alt="Sellbrite" title="Sellbrite" /></a><br>
 
 
 
 
 
 
 
 
26
  <fieldset>
27
  <h2>SOAP API Credentials</h2>
28
  <b>Api User:</b> <code><?php echo $this->getSoapUser(); ?></code><br><br>
40
  document.observe('dom:loaded', function(){
41
  $('config_edit_form').insert({
42
  'after': '<form method="post" action="<?php echo $this->getEndPointUrl(); ?>" id="sellbrite_connection_form">'
 
 
 
 
43
  + '<input type="hidden" name="api_key" value="<?php echo $this->getApiKey(); ?>" />'
44
  + '<input type="hidden" name="api_user" value="<?php echo $this->getSoapUser(); ?>" />'
45
+ + '<input type="hidden" name="uid" value="<?php echo Mage::getBaseUrl(); ?>" />'
46
+ + '<input type="hidden" name="provider" value="<?php echo 'magento'; ?>" />'
47
  + '</form>'
48
  });
49
  });
package.xml CHANGED
@@ -1,18 +1,19 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>sellbrite</name>
4
- <version>1.1.0.2</version>
5
  <stability>stable</stability>
6
- <license>MIT License</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Simplified Multi-channel selling.</summary>
10
  <description>List your products on more channels, access more customers and maximize your sales, quickly and easily.</description>
11
- <notes>- fixes for version check</notes>
12
- <authors><author><name>Sellbrite</name><user>Sellbrite</user><email>hello@sellbrite.com</email></author></authors>
13
- <date>2015-10-07</date>
14
- <time>04:46:19</time>
15
- <contents><target name="magecommunity"><dir name="Sellbrite"><dir name="Api"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Hint.php" hash="af843f7ba6e1809a24cf9b775ecdfdd2"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="fc1bc420427fc76d541930ff49d25e81"/></dir><dir name="Model"><dir name="Catalog"><dir name="Api2"><dir name="Product"><dir name="Rest"><dir name="Admin"><dir name="V1"><file name="Interceptor.php" hash="63175b4f187b6e4a0c0f5828b9cf0691"/></dir></dir></dir></dir></dir><dir name="Product"><dir name="Format"><dir name="ProductType"><file name="Configurable.php" hash="3ed6fc1e0db3e621570698805e7494a2"/></dir></dir><file name="Plugin.php" hash="143dd633a91f4d59655246ee0628c153"/></dir><dir name="ProductCollection"><file name="Plugin.php" hash="fefd50d1e5bcf314ad1b964ae0ff7ea9"/></dir></dir><file name="Credentials.php" hash="de514640f59d93920513d92ad946bf68"/><dir name="Resource"><file name="Token.php" hash="1235bd275aa329bf394f8fe74328c1a2"/></dir><file name="Token.php" hash="b639a039cf7b936b4b18eff6421f2602"/></dir><dir name="data"><dir name="sellbrite_setup"><file name="data-install-1.1.0.php" hash="9602a56f78e5aa5afae3f64ce272a7b6"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="d15a171ae1cede0f46acfd8b2d31f12c"/><file name="api2.xml" hash="16aea70942e0b4c4a4bce1fb4c0128b0"/><file name="config.xml" hash="694f1b4ab449ab70dacde49c4220ae64"/><file name="system.xml" hash="34a4d1c88115c78887e65bc14d8ef06e"/></dir></dir><dir name=".idea"><file name="Sellbrite.iml" hash="c9bd9f053e6a09728e39aac3967676f1"/><file name="encodings.xml" hash="d24e6fc9c25296e2c77734f2deb2164d"/><file name="modules.xml" hash="cc9a40e00aa018418d0467baaf1076da"/><dir name="scopes"><file name="scope_settings.xml" hash="3d0b1957d39aa5636904788c54e654cf"/></dir><file name="vcs.xml" hash="241f194483e072034a73b09046c5b480"/><file name="workspace.xml" hash="5f534d63504994a6da5903166e91664c"/><file name=".name" hash="dd9e3cf83d1faf93e8c8506b4d8fd5a7"/></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="template"><dir name="sellbrite"><dir name="api"><dir name="system"><dir name="config"><dir name="fieldset"><file name="hint.phtml" hash="243f1c7bde19a19fbcd50623d39bfd92"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Sellbrite_Api.xml" hash="1caa543c8db9bc2e24dc4bd4e07cf1a7"/></dir></target></contents>
 
16
  <compatible/>
17
- <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>sellbrite</name>
4
+ <version>1.1.1.0</version>
5
  <stability>stable</stability>
6
+ <license>MIT</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Simplified Multi-channel selling.</summary>
10
  <description>List your products on more channels, access more customers and maximize your sales, quickly and easily.</description>
11
+ <notes>- add new Sellbrite product list SOAP api with pagination&#xD;
12
+ - remove using REST API</notes>
13
+ <authors><author><name>Selbrite</name><user>Sellbrite</user><email>hello@sellbrite.com</email></author></authors>
14
+ <date>2016-08-17</date>
15
+ <time>05:38:29</time>
16
+ <contents><target name="magecommunity"><dir name="Sellbrite"><dir name="Api"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Hint.php" hash="a69ef5e41d264dba6ffeedfa7e302a5e"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="fc1bc420427fc76d541930ff49d25e81"/></dir><dir name="Model"><dir name="Catalog"><dir name="Product"><dir name="Api"><file name="V2.php" hash="bcc476bdc1b9709d15de792c669c7a84"/></dir><file name="Api.php" hash="524277cf4c21741830032eeaad04ec8d"/></dir></dir><file name="Credentials.php" hash="1700cfc78747dfe9cc4b997e43ca8074"/></dir><dir name="data"><dir name="sellbrite_setup"><file name="data-install-1.1.0.php" hash="ac25ecd20c8f3cf716aa1542d669e452"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="d15a171ae1cede0f46acfd8b2d31f12c"/><file name="api.xml" hash="6057bc38c8310d0f5f0e813c9dd217c2"/><file name="config.xml" hash="36ca10e149e95d70bdfdf6f177827f20"/><file name="system.xml" hash="34a4d1c88115c78887e65bc14d8ef06e"/><file name="wsdl.xml" hash="3a2b9583eedae9cb7d938aac6c3c437f"/><file name="wsi.xml" hash="eeb8a4e7743ba2fb212550c92504f8d5"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="template"><dir name="sellbrite"><dir name="api"><dir name="system"><dir name="config"><dir name="fieldset"><file name="hint.phtml" hash="cbc512ae4bd38153976a5cdb9a37f905"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Sellbrite_Api.xml" hash="1caa543c8db9bc2e24dc4bd4e07cf1a7"/></dir></target></contents>
17
  <compatible/>
18
+ <dependencies><required><php><min>5.1.0</min><max>7.0.0</max></php><extension><name>soap</name><min/><max/></extension></required></dependencies>
19
  </package>