[TYPO3-shop] No tax outside of country
Simon Browning
simon at stwdesign.com
Fri Feb 29 07:23:22 CET 2008
Franz Holzinger wrote:
> Simon Browning a écrit :
>> Maybe I'm not doing it the best way. I want to turn the tax on or off
>> based on the country (eventually and/or state) the product is being
>> shipped to .. must I do this with the shipping field or can I set it
>> based on the delivery address? Technically someone could select
>> delivery to Canada, but then select a delivery method that doesn't
>> include tax.
> The country selection on the following page already uses this where
> clause. So if you use the country select box for choosing the country of
> the address, then only the countries are offered which have the same
> shipping condition. The customer can only select from the limited
> countries. Or he must go back to the basket and select Canada in order
> to have Canada on the address input.
>
>
> - Franz
>
Hi Franz.
Here's whats happening now.
With:
10.title = Shipping ###STATICCOUNTRIES_CN_OFFICIAL_NAME_EN###
10.where.static_countries = cn_short_local != 'Canada'
...
20.title = Shipping ###STATICCOUNTRIES_CN_OFFICIAL_NAME_EN###
20.where.static_countries = cn_short_local == 'Canada'
...
I get an sql error (debug output pasted below). The server is running
mysql server 4.1.22 if that is of use.
If I use
20.where.static_countries = cn_short_local = 'Canada'
I don't get the error, but my billing & delivery addresses don't have
Canada in the country dropdown. The shipping options include all the
countries (Canada at the bottom).
Debug Output -- is that repetition of static)countries in the where line
correct?
caller t3lib_DB::exec_SELECTquery
ERROR You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use
near '== 'Canada'' at line 4
lastBuiltQuery SELECT static_countries.uid uid,static_countries.pid
pid,static_countries.cn_official_name_en cn_official_name_en
FROM static_countries static_countries
WHERE
1=1 AND static_countries.cn_short_local == 'Canada'
debug_backtrace require // include // tspagegen::rendercontent //
tslib_cobj->cobjget // tslib_cobj->cobjgetsingle // tslib_cobj->user //
tslib_cobj->calluserfunction // call_user_method //
tx_templavoila_pi1->main_page // tx_templavoila_pi1->renderelement //
tx_templavoila_pi1->processdatavalues // tslib_cobj->cobjget //
tslib_cobj->cobjgetsingle // tslib_cobj->records //
tslib_cobj->cobjgetsingle // tslib_cobj->cobjgetsingle //
tslib_cobj->casefunc // tslib_cobj->cobjgetsingle //
tslib_cobj->cobj_array // tslib_cobj->cobjget //
tslib_cobj->cobjgetsingle // tslib_cobj->casefunc //
tslib_cobj->cobjgetsingle // tslib_cobj->casefunc //
tslib_cobj->cobjgetsingle // tslib_cobj->cobjgetsingle //
tslib_cobj->user // tslib_cobj->calluserfunction // call_user_method //
tx_ttproducts_pi1->main // tx_ttproducts_pi1->doprocessing //
tx_ttproducts_control->doprocessing //
tx_ttproducts_basket_view->getview //
tx_ttproducts_paymentshipping->generateradioselect //
tx_ttproducts_country->get // tx_table_db->exec_selectquery //
t3lib_db->exec_selectquery // t3lib_db->debug
Thank you for all your help.
Simon
More information about the TYPO3-project-tt-products
mailing list