[TYPO3-commerce] configuration commerce_coupons

Ralph @ inktVlek concepten info at inktvlek.nl
Mon Nov 30 22:01:35 CET 2009


Hi Ralf and others, I am starting to understand the problem that "The 
coupon is invalid" is showing, but I don't know how to fix this...

- I see there are 3 article types in the db: article (UID 1), payment 
(UID 2) and delivery (UID 3). During the installation the extension did 
not extend the article types with normal (UID 4), special (UID 5) and 
use-coupon (UID 6). In fact they are nowhere to be found
- and probably most important is bug #1409 
(http://forge.typo3.org/issues/show/1409), where it says there are no db 
fields tx_commercecoupons_related_categories and 
tx_commercecoupons_include_exclude_category created which are mentioned 
in the TCA

As I am not a programmer I really have no idea how to fix these? Can you 
help me or give me a lead how to fix these?


Ralf Merz wrote:
> Hi Ralph,
> 
> On 2009-11-27 23:58:03 +0100, "Ralph @ inktVlek concepten" 
> <info at inktvlek.nl> said:
> 
>> Hello, I use T3 (4.2.10) in combination with EXT commerce (0.9.4) 
>> succesfully and would like to know how to configure EXT 
>> commerce_coupons (0.2.0) but I can't get it to work... I get the 
>> message: "The coupon code is invalid."
> 
> This message says that the article(s) in the basket ist not in an 
> allowed category.
> "include or exclude selected categories" should be selected and then 
> choose your category(s).
> Also important is to give a number / quantity for a coupon: greater than 
> 0 or "-1" for unlimited.
> 
>>
>> Questions:
>> - EXT commerce_coupons generated a product COUPONS (UID 12) with three 
>> artices: syscoupon (UID 24), syscoupon_special (UID 25), syscoupon_use 
>> (UID 26), these have ArticleType Article. Is this ok?
> 
> Yes, the new articles are ok. The syscoupon is used as it is meant to be 
> a "normal" coupon: enter code, get percent or price discount. The 
> special article is meant to give an additional article as discount, I 
> mean you can get a discaount and add an article as gift, like a little 
> bottle of champaign. The _use coupon is meant to be an article you can 
> buy, so you can buy a coupon and send it to a friend.
> 
>> - I have created a coupon (type Enabled) but cannot change the Article 
>> (INVALID VALUE 24). What is wrong?
> 
> After a fresh installation this should work.
> 
>> - I have created a Related articles for coupons but what article 
>> should I select? One of the articles that are sold, or the article 
>> syscoupon?
> 
> The Related Article you select is the gift a customer get´s when he 
> enters the coupon code. You can give this gift for free or enter a price 
>  > 0 for that article.
> 
>> - in the template setup couponNormalType = 4, but where can I find 
>> this really is UID 4?
> 
> In an normal installation, commerce creates 3 article types: 1 normal, 2 
> delivery, 3 payment. (maybe 2 is payment and 3 delivery, don´t have in 
> mind at the moment). That´s what commerce_coupons extends: the types, so 
> it creates 4,5 and 6 for normal, special and use-coupons.
> 
>> - in the template setup couponArticleId = 12, but what UID should I use?
> 
> If you sell coupons, this is the UID of the article you have to create 
> (want to sell as coupon) in your cat tree.
> 
> 
>>
>> Can anybody help me get this thing to work? Or is there any other way 
>> to check for a code and give people a discount?
> 
> I hope I could help. Else you have to write your own hooks.
> 
> Greets
> Ralf
> 
> 
>>
>> I use the following configuration:
>>
>>
>> In Constants:
>>
>> plugin.tx_commercecoupons_pi1 {
>>    templateFile = EXT:commerce_coupons/pi1/couponfile.tmpl
>>    useCouponPid = 319
>>    basketPid = 174
>>    errorPID = 141
>> #  showCouponFormTextUID = 0
>> #  articleAddUID = 0
>> #  errorTextUID = 0
>> #  couponWithoutArticleTextUID = 0
>>    useBacklink = 1
>>    }
>>
>>
>> In Setup:
>>
>> plugin.tx_commercecoupons_pi1 {
>>    couponNormalType = 4
>>    couponRelatedType = 5
>>    couponBuyType = 6
>>
>>    templateFile = {$plugin.tx_commercecoupons_pi1.templateFile}
>>      useCouponPid = {$plugin.tx_commercecoupons_pi1.useCouponPid}
>>      basketPid = {$plugin.tx_commercecoupons_pi1.basketPid}
>>      errorPID = {$plugin.tx_commercecoupons_pi1.errorPID}
>>
>>      useBacklink = {$plugin.tx_commercecoupons_pi1.useBacklink}
>>
>>      showCouponFormText = RECORDS
>>      showCouponFormText {
>>        tables = tt_content
>>        source = {$plugin.tx_commercecoupons_pi1.showCouponFormTextUID}
>>        }
>>
>>      articleAdd = RECORDS
>>      articleAdd {
>>      tables = tt_content
>>      source = {$plugin.tx_commercecoupons_pi1.articleAddUID}
>>      }
>>
>>      errorText = RECORDS
>>      errorText {
>>      tables = tt_content
>>      source = {$plugin.tx_commercecoupons_pi1.errorTextUID}
>>    }
>>
>>    couponWithoutArticleText = RECORDS
>>    couponWithoutArticleText {
>>    tables = tt_content
>>    source = {$plugin.tx_commercecoupons_pi1.couponWithoutArticleTextUID}
>>    }
>>
>> _CSS_DEFAULT_STYLE (
>>    h3.tx-commercecoupons-pi1-header-errorlink {
>>      color:red;
>>      }
>>
>>    div.tx-commercecoupons-pi1-errorlink {
>>    }
>>
>>    div.tx-commercecoupons-pi1-backlink {
>>    }
>> )
>>
>> }
>>
>> plugin.tx_commerce_pi2 {
>>    couponNormalType = 4
>>    couponRelatedType = 5
>>    couponBuyType = 6
>>    couponBasketTemplateFile = 
>> EXT:commerce_coupons/pi1/couponsInBasket.tpl
>>    }
>>
>> plugin.tx_commerce_pi3 {
>>    couponNormalType = 4
>>    couponRelatedType = 5
>>    couponBuyType = 6
>>    couponArticleId = 12
>>    couponListingTemplateFile = 
>> EXT:commerce_coupons/pi1/couponsInListing.tpl
>>    couponFinishTemplateFile = 
>> EXT:commerce_coupons/pi1/couponsInFinish.tpl
>>    couponMailsTemplateFile = EXT:commerce_coupons/pi1/couponsInMails.tpl
>>    }
>>
>> Thxs, Ralph
> 
> 


More information about the TYPO3-project-commerce mailing list