Results 1 to 6 of 6
  1. #1
    Join Date
    May 2006
    Posts
    11
    Plugin Contributions
    2

    Default Post BillPay Barcode - Calculating code

    I am trying to create a Barcode, I have the following variables
    Order Total: $25.35
    Customer Number: 6
    What I need:
    Order Total: I need to take the order total convert it to cents and make it fixed 9 digit (000002535)
    Customer Number: I need the Customer number to become a fixed 6 digits (000006)

    083215<Order Total>100415556<Customer Number>80
    will read
    0832150000025351004155560000680

    Thanks

  2. #2
    Join Date
    Feb 2006
    Location
    Chicago
    Posts
    1,162
    Plugin Contributions
    0

    Default Re: Post BillPay Barcode - Calculating code

    Fine, so where are you facing the problem?
    Tutorials on Zen Cart
    http://tutorials.zen-cart.com/index.php
    ---------------
    advanced.programmer at gmail dot com
    In love with Zen Cart!!

  3. #3
    Join Date
    May 2006
    Posts
    11
    Plugin Contributions
    2

    Default Re: Post BillPay Barcode - Calculating code

    i don't know how to use php to convert the amount into cents and have 9 digits (ie $25.35 into 000002535) and get the customer number into a 6 digit number (ie 6 into 000006)

  4. #4
    Join Date
    Feb 2006
    Location
    Chicago
    Posts
    1,162
    Plugin Contributions
    0

    Default Re: Post BillPay Barcode - Calculating code

    Code:
    <?
    $order_total=25.35;
    $customer_number="6";
    $len=strlen($customer_number);
    $zeros="";
    $modified_order_total=$order_total*100;
    if($len<6)
    {
    	for($i=6;$i>$len;$i--)
    		{
    			$zeros.="0";
    		}
    }
    
    $customer_number=$zeros.$customer_number;
    $len=strlen($modified_order_total);
    if($len<9)
    {
    	for($i=6;$i>$len;$i--)
    		{
    			$zeros.="0";
    		}
    }
    $modified_order_total=$zeros.$modified_order_total;
    
    $final_string="083215"."$modified_order_total"."100415556".$customer_number."80";
    echo $final_string;
    
    ?>
    Tutorials on Zen Cart
    http://tutorials.zen-cart.com/index.php
    ---------------
    advanced.programmer at gmail dot com
    In love with Zen Cart!!

  5. #5
    Join Date
    May 2006
    Posts
    11
    Plugin Contributions
    2

    Default Re: Post BillPay Barcode - Calculating code

    This may be a lot to ask, but how do i go about creating a payment module with the ordter total being used from the check out and the customers id number being used, but then having the outcome (ie 083215<Order Total>100415556<Customer Number>80) producing an imahge using this sting
    http://www.java4less.com/barcodes/1D/php/demo.php?GENERATE=1&CODETYPE=CODE39&CODE=100415556<Customer Number>80&CHECK_CHAR=N&IMG_TYPE=PNG&I=1&SUPPLEMENT=0&UPCE_SYSTEM=0&ROTATE=0&X=1& N=2&BAR_HEIGHT=50&QUITE_ZONE=10&BACK_COLOR=WHITE&BAR_COLOR=BLACK&FONT_COLOR=WHIT E&TEXT_FONT=DEFAULT-3&TEXT_SIZE=0&.

    I am willing to pay you if you are able to do this for me.
    please email me [email protected] to arrange this if you wish to proceed

  6. #6
    Join Date
    Feb 2006
    Location
    Chicago
    Posts
    1,162
    Plugin Contributions
    0

    Default Re: Post BillPay Barcode - Calculating code

    I have sent you an email
    Thanks
    Tutorials on Zen Cart
    http://tutorials.zen-cart.com/index.php
    ---------------
    advanced.programmer at gmail dot com
    In love with Zen Cart!!

 

 

Similar Threads

  1. v154 Scan Barcode > Post Order Update
    By ShopVille in forum General Questions
    Replies: 14
    Last Post: 12 Sep 2015, 02:41 AM
  2. Barcode packing slips usage - where to asign barcode to product
    By cornelmarian in forum Addon Shipping Modules
    Replies: 0
    Last Post: 10 Mar 2011, 11:00 PM
  3. Replies: 8
    Last Post: 19 Jan 2010, 04:03 PM
  4. Post to MySpace button code
    By Coldstone in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 19 Jun 2008, 05:14 PM
  5. Tax calculating and not calculating
    By pottsy in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 1
    Last Post: 5 Mar 2008, 10:11 AM

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