Zahlarten abhängig vom Artikel

Hallo Oxid Forum

Wie kann ich die Zahlungsart vom Artikel abhängig machen…

Ich habe einige Artikel welche nur gegen Kreditkarte gekauft werden können…

Sonst ist es Rechnung 10 Tage

Danke für die Hilfe…

habe schon viel rumgebastelt …aber das nur Kredikarten dann kommen kriege ich nicht hin…

…wow danke

kann ich das als CODE Dau installieren

Wie kriege ich eine Hidden Kategorie hin…

With this module, a hidden category “nopaypal” can be created and payment via Paypal is not possible if an article in basket belongs to this category.

Array $_aTemplateDisallowPayment defines which payments are not allowed for a certain theme,
e.g. theme “mobile” for restriction of payments in mobile theme

Array $_aCategoryDisallowPayment defines which payments are not allowed for a certain category,
e.g. hidden category “nopaypal” for disallowing paypal for certain articles

Denke schon dass die Installation machbar ist. Musst halt den Kategorienamen und die ID der Zahlart im Modul anpassen, das kann man z.B. mit Notepad erledigen, und hochladen. Bei “Kategorien” im Backend kannst du die Kategorie erstellen und “aktiv” und “versteckt” einschalten.

ok…uff

Ich habe eine verstecke Kategore angelegt “NUR_KREDITKARTE”

wie finde ich die //The id of the payment raus

protected $_aCategoryDisallowPayment = array(
    //example: no payment by paypal for articles in hidden category "nopaypal"
    //the name of the category (make shure the category has the same name in all languages)
    //category can be hidden but must be active
    'NUR_KREDITKARTENl'=> array(
        //The id of the payment
        'oxidpaypal',
    ),
);

geht das so (im test passiert noch nichts,aber auch keine fehlermeldung)

<?php  

class payment_restrictions_payment extends payment_restrictions_payment_parent 
{
    protected $_aTemplateDisallowPayment = array(
        //example: no payment by invoice for mobile customers
        //the id of the Theme
        'mobile'=> array(
            //The id of the payment
            'oxidinvoice',
        ),
    );
    protected $_aCategoryDisallowPayment = array(
        //example: no payment by paypal for articles in hidden category "nopaypal"
        //the name of the category (make shure the category has the same name in all languages)
        //category can be hidden but must be active
        'NUR_KREDITKARTEN'=> array(
            //The id of the payment
            'Test Rechnung 10 Tage',
        ),
    );

Wenn die Kategorie “NUR_KREDITKARTE” heißt dann sollte das auch so in der Datei stehen :wink:
Die Id der Zahlart kannst du sehen wenn du im Backend mit der Maus über die Zahlart gehst, dann wird dir unten im Browser der Link mit der Id angezeigt, z.B:
javascript:top.oxid.admin.editThis(‘oxidcreditcard’);
in dem Fall wäre die Id oxidcreditcard.

konnte das so ausschauen ?

PS bei kommen keine links unten im browser

protected $_aCategoryDisallowPayment = array(
//example: no payment by paypal for articles in hidden category “nopaypal”
//the name of the category (make shure the category has the same name in all languages)
//category can be hidden but must be active
'b9fc28cef3817fa41af382be4258626c’=> array(
//The id of the payment
‘9e13e88bc1a136b6585f82b02eb9843f’,
),

bin da ein bisschen am reverse engenieering…

ich habe die richtigen daten

!! Problem OXACTIVE_1 und OXACTIVE_2 sind auf 0 (nehme an nicht aktive)

Hacken ist aber gesetzt bei aktiv und hidden

protected $_aCategoryDisallowPayment = array(
    //example: no payment by paypal for articles in hidden category "nopaypal"
    //the name of the category (make shure the category has the same name in all languages)
    //category can be hidden but must be active
   [B] 'b9fc28cef3817fa41af382be4258626c'[/B]=&gt; array(
        //The id of the payment
       [B] '9e13e88bc1a136b6585f82b02eb9843f',[/B]

es geht fehler gefunden

bei der catogery muss der OXTITLE angegeben werden

und bei der Zahlmethode OXID

siehe unten uff…

protected $_aCategoryDisallowPayment = array(
//example: no payment by paypal for articles in hidden category “nopaypal”
//the name of the category (make shure the category has the same name in all languages)
//category can be hidden but must be active
’NUR_KREDITKARTE’=> array(
//The id of the payment
’9e13e88bc1a136b6585f82b02eb9843f’,

noch letze frage wenn man die themen abfrage nicht braucht kann man das abschalten ?

class payment_restrictions_payment extends payment_restrictions_payment_parent
{
protected $_aTemplateDisallowPayment = array(
//example: no payment by invoice for mobile customers
//the id of the Theme
’mobile’=> array(
//The id of the payment
’oxidinvoice’,

Ja du kannst einfach die Zeile mit dem Payment auskommentieren:
//‘oxidinvoice’,

Kann man auch 2 Abfragen machen

so das 2 payments ausgeschlosen werden

wie müsste das man verschachteln ?

:slight_smile: :slight_smile: soweit mega freude es läuft

protected $_aCategoryDisallowPayment = array(
    //example: no payment by paypal for articles in hidden category "nopaypal"
    //the name of the category (make shure the category has the same name in all languages)
    //category can be hidden but must be active oxcategories OXTITLE
    'hidden_1'=&gt; array(
        //The id of the payment
        'PAYMENT_1f',

protected $_aCategoryDisallowPayment = array(
    //example: no payment by paypal for articles in hidden category "nopaypal"
    //the name of the category (make shure the category has the same name in all languages)
    //category can be hidden but must be active oxcategories OXTITLE
    'hidden_1'=&gt; array(
        //The id of the payment
        'PAYMENT_2f',

Super. 2. Payment für die gleiche Kategorie sollte sich einfach nach dem bestehenden einfügen lassen:

‘hidden_1’=> array(
//The id of the payment
’PAYMENT_1f’,
//another payment
’PAYMENT_2f’,