Page 3 of 7 FirstFirst 12345 ... LastLast
Results 21 to 30 of 64
  1. #21
    Join Date
    Jul 2008
    Posts
    360
    Plugin Contributions
    0

    Default Re: Create a new module for International Checkout payment module

    Quote Originally Posted by zamzom
    I don't understand why you use html input command, do you expect your customers to enter that data from a form? I think those items knowledge must be available in your cart items data, and you need fetch/form them somehow from there (i don't know how).

    Paypal.php module creates paypal session history and keeps it in the database. session_id in the following is a reference to that database item. If you follow the methods you will recognize that it will be removed from the database later on after successful payment. You can keep this (provided you change the database name from TABLE_PAYPAL_SESSION to yours, unless you want to screw up the paypal database )
    PHP Code:
    $_SESSION['ppipn_key_to_remove'] = session_id(); 
    Well the payment gateway expects a form within an iframe, but I will modify it to process the data using curl ...

  2. #22
    Join Date
    Jul 2008
    Posts
    360
    Plugin Contributions
    0

    Default From where I have to retrieve images to pass the info into a hidden field?

    I need to use a hidden field with image location. I am trying to submit current cart data into a form using curl, I found the array $orders->products[i] where i has different product information(id, name, qty, price), but I couldn't find out from where I can get the image location to pass it as a hidden field using zen_draw_hidden_field() function, I am trying to mimic the exact display of the shopping cart, onto the processing server, so I have everything else but the image location. to display the thumbnail. Any recommendations?

    Qty Product Name Description and Price are all available from the Order Class, but there is no image location in that array ...

    This module will use curl to pass the cart data(Image Qty Product Name Description and Price) plus the username, it will loop through the order.
    Last edited by icecold; 15 Mar 2010 at 08:33 AM.

  3. #23
    Join Date
    Jan 2004
    Posts
    66,445
    Plugin Contributions
    81

    Default Re: From where I have to retrieve images to pass the info into a hidden field?

    The image is not part of the available data provided during checkout. If you need that, you'll have to query for it.
    .

    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.

  4. #24
    Join Date
    Jul 2008
    Posts
    360
    Plugin Contributions
    0

    Default Re: From where I have to retrieve images to pass the info into a hidden field?

    Quote Originally Posted by DrByte View Post
    The image is not part of the available data provided during checkout. If you need that, you'll have to query for it.
    ok, I see but then where this code is generated?

    <span id="cartImage" class="back"><img src="images/isimages/DH00789BLK.jpg" ...

    I couldn't find what includes are used to show this info ... any particular zen-cart function or Class I need to look?

    I searched the code in shopping_cart and orders classes, to see if the values where queried from a function there, but couldn't find anything.

  5. #25
    Join Date
    Jan 2004
    Posts
    66,445
    Plugin Contributions
    81

    Default Re: From where I have to retrieve images to pass the info into a hidden field?

    In v1.3.x, the shopping_cart class doesn't draw the content for the shopping cart *page*. The class merely manages shopping cart operations, not view activities.
    The image for the shopping cart *page* is obtained inside the controller for that page: /includes/modules/pages/header_php.php
    That code is not replicated in the shopping_cart or order classes because it is not needed there. ie: There's no need to store that info in the order records, so there's no need to process that information at that stage.
    .

    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.

  6. #26
    Join Date
    Jul 2008
    Posts
    360
    Plugin Contributions
    0

    Default Re: From where I have to retrieve images to pass the info into a hidden field?

    Quote Originally Posted by icecold View Post
    ok, I see but then where this code is generated?

    <span id="cartImage" class="back"><img src="images/isimages/DH00789BLK.jpg" ...

    I couldn't find what includes are used to show this info ... any particular zen-cart function or Class I need to look?

    I searched the code in shopping_cart and orders classes, to see if the values where queried from a function there, but couldn't find anything.
    ok, I found it in tpl_shopping_cart, I completely forgot, about the templates controlling html output ...

    so now my question is

    I noticed a foreach loop using $ProductsArray (don't know if that var is defined somewhere)

    PHP Code:
      foreach ($productArray as $product) {
    ?>
         <tr class="<?php echo $product['rowClass']; ?>">
           <td class="cartQuantity">
    <?php
      
    if ($product['flagShowFixedQuantity']) {
        echo 
    $product['showFixedQuantityAmount'] . '<br /><span class="alert bold">' $product['flagStockCheck'] . '</span><br /><br />' $product['showMinUnits'];
      } else {
        echo 
    $product['quantityField'] . '<br /><span class="alert bold">' $product['flagStockCheck'] . '</span><br /><br />' $product['showMinUnits'];
      }
    ?>
           </td>
           <td class="cartQuantityUpdate">
    <?php
      
    if ($product['buttonUpdate'] == '') {
        echo 
    '' ;
      } else {
        echo 
    $product['buttonUpdate'];
      }
    ?>
           </td>
           <td class="cartProductDisplay">
    <a href="<?php echo $product['linkProductsName']; ?>"><span id="cartImage" class="back"><?php echo $product['productsImage']; ?></span><span id="cartProdTitle"><?php echo $product['productsName'] . '<span class="alert bold">' $product['flagStockCheck'] . '</span>'?></span></a>
    <br class="clearBoth" />


    <?php
      
    echo $product['attributeHiddenField'];
      if (isset(
    $product['attributes']) && is_array($product['attributes'])) {
      echo 
    '<div class="cartAttribsList">';
      echo 
    '<ul>';
        
    reset($product['attributes']);
        foreach (
    $product['attributes'] as $option => $value) {
    ?>

    <li><?php echo $value['products_options_name'] . TEXT_OPTION_DIVIDER nl2br($value['products_options_values_name']); ?></li>

    <?php
        
    }
      echo 
    '</ul>';
      echo 
    '</div>';
      }
    ?>
           </td>
           <td class="cartUnitDisplay"><?php echo $product['productsPriceEach']; ?></td>
           <td class="cartTotalDisplay"><?php echo $product['productsPrice']; ?></td>
           <td class="cartRemoveItemDisplay">
    So, it's ok to request $products['productsImage'] and use it as hidden field?
    or I have to do a foreach ... also in my module?

  7. #27
    Join Date
    Jan 2004
    Posts
    66,445
    Plugin Contributions
    81

    Default Re: From where I have to retrieve images to pass the info into a hidden field?

    The template is rendering the View portion of the controller content built in the header_php.php I talked about earlier.
    .

    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.

  8. #28
    Join Date
    Jul 2008
    Posts
    360
    Plugin Contributions
    0

    Default Re: From where I have to retrieve images to pass the info into a hidden field?

    Quote Originally Posted by DrByte View Post
    The template is rendering the View portion of the controller content built in the header_php.php I talked about earlier.
    Yes I saw that in header:

    PHP Code:
    $productArray[$i] = array('attributeHiddenField'=>$attributeHiddenField,
                                
    'flagStockCheck'=>$flagStockCheck,
                                
    'flagShowFixedQuantity'=>$showFixedQuantity,
                                
    'linkProductsImage'=>$linkProductsImage,
                                
    'linkProductsName'=>$linkProductsName,
                                
    'productsImage'=>$productsImage,
                                
    'productsName'=>$productsName,
                                
    'showFixedQuantity'=>$showFixedQuantity,
                                
    'showFixedQuantityAmount'=>$showFixedQuantityAmount,
                                
    'showMinUnits'=>$showMinUnits,
                                
    'quantityField'=>$quantityField,
                                
    'buttonUpdate'=>$buttonUpdate,
                                
    'productsPrice'=>$productsPrice,
                                
    'productsPriceEach'=>$productsPriceEach,
                                
    'rowClass'=>$rowClass,
                                
    'buttonDelete'=>$buttonDelete,
                                
    'checkBoxDelete'=>$checkBoxDelete,
                                
    'id'=>$products[$i]['id'],
                                
    'attributes'=>$attrArray); 
    My question was if it's ok to call the array $productArray directly (as the vars are on the same shopping cart, that page), or I have to do a foreach $productArray as $products ... again?

  9. #29
    Join Date
    Jan 2004
    Posts
    66,445
    Plugin Contributions
    81

    Default Re: From where I have to retrieve images to pass the info into a hidden field?

    Well, if you're not *on* the shopping cart page when you're running your particular code, then that whole array won't even be available to you, so you won't be able to use the variables at all.

    But, assuming you were on that page, if you think about it, the foreach is used to render each line in the shopping cart. So, unless you're already doing something as part of looping thru the array within the template, you'll have to loop thru it again if you want it to handle *all* products in the cart.
    .

    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.

  10. #30
    Join Date
    Jul 2008
    Posts
    360
    Plugin Contributions
    0

    Default Re: Create a new module for International Checkout payment module

    To be a bit more specific I meant

    $process_button zen_draw_hidden_field('image', $products->products['productImage']) ...

 

 
Page 3 of 7 FirstFirst 12345 ... LastLast

Similar Threads

  1. How to create new payment module?
    By Macedonium in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 15 May 2009, 09:47 PM
  2. Create payment module for cc gateway
    By ccppll in forum Built-in Shipping and Payment Modules
    Replies: 7
    Last Post: 22 Apr 2009, 05:00 PM
  3. How to Create a Transaction ID for Payment Module?
    By Diego Vieira in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 21 Mar 2009, 04:40 PM
  4. How to create new payment module?
    By mscro in forum Built-in Shipping and Payment Modules
    Replies: 9
    Last Post: 28 Apr 2008, 12:23 AM
  5. How do I create a new payment module?
    By meeven in forum Built-in Shipping and Payment Modules
    Replies: 7
    Last Post: 12 Aug 2007, 01:29 PM

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