silverstripesilvershop

Silverstripe 4 silvershop-core paypal-expr. tax & shipping


With SS4 + silvershop-core + palpal-express: In the CMS/Catalog/Product -> Pricing i can fill in a Price.

e.g.: € 12.90 (12,90) meaning the Base price. (= netto = exclusive Tax 15%)

in shop.yml:

SilverShop\Model\Order:
  modifiers:
    - 'SilverShop\Model\Modifiers\Shipping\Simple'
    - 'SilverShop\Model\Modifiers\Tax\FlatTax'

QUESTIONS:

enter image description here

enter image description here


Solution

  • We can set the FlatTax to be inclusive by adding the following to our shop.yml and flushing the site cache:

    SilverShop\Model\Modifiers\Tax\FlatTax:
      exclusive: false
    

    By checking the src/Model/Modifiers/Tax/FlatTax.php we can see what the config settings are for the FlatTax class.

    We can also change the flat tax rate and the name of the flat tax like so:

    SilverShop\Model\Modifiers\Tax\FlatTax:
      exclusive: false
      rate: 0.20
      name: 'VAT'
    

    By checking the src/Model/Modifiers/Shipping/Simple.php we can see what the config settings are for the Simple shipping class. We can also change these default settings:

    SilverShop\Model\Modifiers\Shipping:
      default_charge: 10
      charges_by_country:
        - 'AU': 20
        - 'FR': 15