Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 48
  1. #11
    Join Date
    Jan 2008
    Location
    Chevreuse, France
    Posts
    273
    Plugin Contributions
    0

    Default Re: Where is the order total field ?

    Anyone ?

  2. #12
    Join Date
    Jan 2008
    Location
    Chevreuse, France
    Posts
    273
    Plugin Contributions
    0

    Default Re: Only 1% of the order is sent to the gateway

    Me again. If I read $order in the Atos module, I get this :

    PHP Code:
    order Object
    (
        [
    info] => Array
            (
                [
    order_status] => 1
                
    [currency] => EUR
                
    [currency_value] => 1.00000000
                
    [payment_method] => 
                [
    payment_module_code] =>
                [
    coupon_code] => 
                [
    shipping_method] => Frais de Livraison (Montant)
                [
    shipping_module_code] => flat_flat
                
    [shipping_cost] => 60
                
    [subtotal] => 955
                
    [tax] => 0
                
    [total] => 1015
                
    [tax_groups] => Array
                    (
                        [
    Taux de Taxes Inconnu] => 0
                    
    )

                [
    comments] => 
                [
    ip_address] => XXXXXXXXX XXXXXXXXXXXXX
            

    whereas doing the same thing with the Paypal module, I get this

    PHP Code:
    order Object
    (
        [
    info] => Array
            (
                [
    order_status] => 1
                
    [currency] => EUR
                
    [currency_value] => 1.00000000
                
    [payment_method] => 
                [
    payment_module_code] => 
                [
    coupon_code] => 
                [
    shipping_method] => Frais de Livraison (Montant)
                [
    shipping_module_code] => flat_flat
                
    [shipping_cost] => 60
                
    [subtotal] => 955
                
    [tax] => 0
                
    [total] => 346.5
                
    [tax_groups] => Array
                    (
                        [
    Taux de Taxes Inconnu] => 0
                    
    )

                [
    comments] => 
                [
    ip_address] => XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXX
            

    The two [total] fields send different values. Why ? I want the Atos module to pick up the same total as Paypal, ie the deposit due when the order is placed. How can I get the Atos module to behave in the same way as Paypal's ?

    Cheers

    Pete

  3. #13
    Join Date
    Jan 2008
    Location
    Chevreuse, France
    Posts
    273
    Plugin Contributions
    0

    Default PHP Code

    Is there anywhere in the forums where we could submit php code problems ? I'm not talking about anything vastly complicated because there are specialist forums out there but it would be nice if we could post a snippet or two so as to obtain some quick advice from fellow Zen users !

    Cheers

    Pete

  4. #14
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: PHP Code

    This facility already exists
    i.e.
    when posting message, require code insert,
    click hash key icon..WRAP code tags around
    selected text.

  5. #15
    Join Date
    Jan 2008
    Location
    Chevreuse, France
    Posts
    273
    Plugin Contributions
    0

    Default Re: PHP Code

    I know the wrap-around function exists but what I meant was is there a specific place to post ? There doesn't appear to be.

    I have a problem with a piece of code but will make one or two more tests before posting here.

    Cheers

    Pete

  6. #16
    Join Date
    Jan 2008
    Location
    Chevreuse, France
    Posts
    273
    Plugin Contributions
    0

    Default PHP If...Else question

    Simple for the php savvies really : in a payment module, for orders having a value of >200, I want 30% of the order to be sent to the bank. For the rest, 100% of the order is due. Here is the code (which doesn't work) :

    PHP Code:
    $sips $this->makeRequest($order->info['total'], $currency);
          
           if (
    $sips 200)  { 
         echo 
    $sips $this->makeRequest($order->info['total']*0.30$currency);
    } else {
        echo 
    $sips $this->makeRequest($order->info['total'], $currency);
    }
    echo 
    '">'."\n"
    Only the first part of the code, ie:
    PHP Code:
    echo $sips $this->makeRequest($order->info['total']*0.30$currency); 
    works, the second part, ie :
    PHP Code:
    echo $sips $this->makeRequest($order->info['total'], $currency);

    doesn't. Why not ?

  7. #17
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: PHP If...Else question

    How about separating out the assignment and the echo by changing the whole thing to:
    PHP Code:
    $sips $this->makeRequest($order->info['total'], $currency); 
    if (
    $sips 200)  {  
      
    $sips number_format($sips*0.30,2); 

    echo 
    $sips '">'."\n"
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  8. #18
    Join Date
    Jan 2008
    Location
    Chevreuse, France
    Posts
    273
    Plugin Contributions
    0

    Default Re: PHP If...Else question

    Thanks. Unfortunately that doesn't work either. In fact, its even worse. Another board, someone told me that I must && statements without saying how. As I only have one variable - $sips - I don't what I'm supposed to compare with it. I'll get there in the end but this is a tad frustrating !

    What do you think ?

    Cheers

  9. #19
    Join Date
    Jan 2008
    Location
    Chevreuse, France
    Posts
    273
    Plugin Contributions
    0

    Default $order->info['total']

    I see in the payment modules that this line is what fishes out the order amount. The question is : where does the info come from, ie which files ? I ask the question because I need to add an if...else statement so that only 30% of orders over 200 Euros are debited. I've added the statement to the Paypal module and it works but it doesn't work with the custom module : 30% is debitted whether the order exceeds 200 Euros or not.

    The custom payment module's order info line is
    PHP Code:
    $sips $this->makeRequest($order->info['total'], $currency); 
    Whereas Paypal's is
    PHP Code:
    $this->totalsum $order->info['total']; 
    They look similar to me !

    Thanks

    Pete

  10. #20
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: $order->info['total']

    How many more threads are you going to open on the same question?

    And, which payment module is this for now? You've been talking about paypal, atos, payline ... how many modules are you altering? How many modules do you need to run on your site?

    Having your disjointed questions scattered all over makes it hard to follow the "why" behind your posts. And, frankly, when I see that, I click "next" and move on to another topic, ignoring yours.

    So ... you might reconsider your approach.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 
Page 2 of 5 FirstFirst 1234 ... LastLast

Similar Threads

  1. v151 Convert osC Payment module Atos for PHP5.3 into Zen cart - Need Help
    By xav2 in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 2 Dec 2013, 09:18 AM
  2. v151 Payment module ATOS for PHP5.3 ?
    By xav2 in forum All Other Contributions/Addons
    Replies: 15
    Last Post: 23 Jul 2013, 08:26 AM
  3. Atos payment module for 1.3.9h
    By meth0d in forum Addon Payment Modules
    Replies: 1
    Last Post: 19 Oct 2011, 03:54 PM
  4. question of ATOS payment module
    By bear1728 in forum Addon Payment Modules
    Replies: 1
    Last Post: 21 Jul 2009, 11:05 PM
  5. [French] atos / sips module payment
    By djimmy in forum Addon Payment Modules
    Replies: 1
    Last Post: 12 Mar 2007, 06:48 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR