Jump to content

[Web Service] Tax Rules on Product


supermanbra

Recommended Posts

Hi Everybody, I have a little problem while creating a product throw the Webservice. It's no problem to create a single product, but, when i want to add taxes to that product, i have to add Tax Rules, but I can't create the Tax Rules by the webserver, only the taxes. And I don't want to be forced to set it up by hand every new product.

 

 

Thank you all!!

Link to comment
Share on other sites

Hi Everybody, I have a little problem while creating a product throw the Webservice. It's no problem to create a single product, but, when i want to add taxes to that product, i have to add Tax Rules, but I can't create the Tax Rules by the webserver, only the taxes. And I don't want to be forced to set it up by hand every new product.

 

 

Thank you all!!

 

 

Any idea for where to look or somthing???

Link to comment
Share on other sites

  • 1 month later...

in WebserviceRequest.php file

in public static function getResources() fuction in $resources array variable add this 2 lins at end

 

'tax_rules' => array('description' => 'Tax rules entity', 'class' => 'TaxRuleCore'),

'tax_rule_groups' => array('description' => 'Tax rule groups', 'class' => 'TaxRulesGroupCore'),

 

 

in TaxRule.php file

 

add TaxRuleCore class add variable

protected $webserviceParameters = array(

'fields' => array(

'id_tax_rules_group' => array('xlink_resource'=> 'tax_rule_groups'),

'id_state' => array('xlink_resource'=> 'states'),

'id_country' => array('xlink_resource'=> 'countries')

),

);

 

in TaxRulesGroup.php file

 

add TaxRulesGroupCore class add variable

protected $webserviceParameters = array(

'objectsNodeName' => 'tax_rule_groups',

'objectNodeName' => 'tax_rule_group',

'fields' => array(

),

);

 

Then you will find an option to enable Permissions in Webservice Accounts.

 

Njoy Coding!!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...