|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* @file |
|
5
|
|
|
* Magento API Client (SOAP v1). |
|
6
|
|
|
* Allows wrappers for each call, dependencies injections |
|
7
|
|
|
* and code completion. |
|
8
|
|
|
* |
|
9
|
|
|
* @author Sébastien MALOT <[email protected]> |
|
10
|
|
|
* @license MIT |
|
11
|
|
|
* @url <https://github.com/smalot/magento-client> |
|
12
|
|
|
* |
|
13
|
|
|
* For the full copyright and license information, please view the LICENSE |
|
14
|
|
|
* file that was distributed with this source code. |
|
15
|
|
|
*/ |
|
16
|
|
|
|
|
17
|
|
|
namespace Smalot\Magento\Catalog; |
|
18
|
|
|
|
|
19
|
|
|
use Smalot\Magento\ActionInterface; |
|
20
|
|
|
use Smalot\Magento\MagentoModuleAbstract; |
|
21
|
|
|
|
|
22
|
|
|
/** |
|
23
|
|
|
* Class ProductCustomOptionValue |
|
24
|
|
|
* |
|
25
|
|
|
* @package Smalot\Magento\Catalog |
|
26
|
|
|
*/ |
|
27
|
|
|
class ProductCustomOptionValue extends MagentoModuleAbstract |
|
28
|
|
|
{ |
|
29
|
|
|
/** |
|
30
|
|
|
* Allows you to add a new custom option value to a custom option. |
|
31
|
|
|
* Note that the custom option value can be added only to the option with the Select Input Type. |
|
32
|
|
|
* |
|
33
|
|
|
* @param string $optionId |
|
34
|
|
|
* @param array $data |
|
35
|
|
|
* @param string $store |
|
36
|
|
|
* |
|
37
|
|
|
* @return ActionInterface |
|
38
|
|
|
*/ |
|
39
|
|
|
public function add($optionId, $data, $store = null) |
|
|
|
|
|
|
40
|
|
|
{ |
|
41
|
|
|
return $this->__createAction('product_custom_option_value.add', func_get_args()); |
|
42
|
|
|
} |
|
43
|
|
|
|
|
44
|
|
|
/** |
|
45
|
|
|
* Allows you to retrieve full information about the specified product custom option value. |
|
46
|
|
|
* |
|
47
|
|
|
* @param string $valueId |
|
48
|
|
|
* @param string $store |
|
49
|
|
|
* |
|
50
|
|
|
* @return ActionInterface |
|
51
|
|
|
*/ |
|
52
|
|
|
public function getInfo($valueId, $store = null) |
|
|
|
|
|
|
53
|
|
|
{ |
|
54
|
|
|
return $this->__createAction('product_custom_option_value.info', func_get_args()); |
|
55
|
|
|
} |
|
56
|
|
|
|
|
57
|
|
|
/** |
|
58
|
|
|
* Allows you to retrieve the list of product custom option values. |
|
59
|
|
|
* Note that the method is available only for the option Select Input Type. |
|
60
|
|
|
* |
|
61
|
|
|
* @param string $optionId |
|
62
|
|
|
* @param string $store |
|
63
|
|
|
* |
|
64
|
|
|
* @return ActionInterface |
|
65
|
|
|
*/ |
|
66
|
|
|
public function getList($optionId, $store = null) |
|
|
|
|
|
|
67
|
|
|
{ |
|
68
|
|
|
return $this->__createAction('product_custom_option_value.list', func_get_args()); |
|
69
|
|
|
} |
|
70
|
|
|
|
|
71
|
|
|
/** |
|
72
|
|
|
* Allows you to remove the custom option value from a product. |
|
73
|
|
|
* |
|
74
|
|
|
* @param string $valueId |
|
75
|
|
|
* |
|
76
|
|
|
* @return ActionInterface |
|
77
|
|
|
*/ |
|
78
|
|
|
public function remove($valueId) |
|
|
|
|
|
|
79
|
|
|
{ |
|
80
|
|
|
return $this->__createAction('product_custom_option_value.remove', func_get_args()); |
|
81
|
|
|
} |
|
82
|
|
|
|
|
83
|
|
|
/** |
|
84
|
|
|
* Allows you to update the product custom option value. |
|
85
|
|
|
* |
|
86
|
|
|
* @param string $valueId |
|
87
|
|
|
* @param array $data |
|
88
|
|
|
* @param string $store |
|
89
|
|
|
* |
|
90
|
|
|
* @return ActionInterface |
|
91
|
|
|
*/ |
|
92
|
|
|
public function update($valueId, $data, $store = null) |
|
|
|
|
|
|
93
|
|
|
{ |
|
94
|
|
|
return $this->__createAction('product_custom_option_value.update', func_get_args()); |
|
95
|
|
|
} |
|
96
|
|
|
} |
|
97
|
|
|
|
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.