Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2008
    Posts
    2
    Plugin Contributions
    0

    Default Trouble cloning - incorrect values passed to the checkout_payment page

    Hello,

    I have almost successfully cloned the "flat" shipping module into what I am looking for - basically adding several price options instead of just one for each "flat" clone.

    (For example, instead of just $5.00 flat, you can choose $5.00 flat 3 day, $8.00 flat for 2 day or $12.00 flat for next day)

    Sample Code:

    $methods = array();

    $methods[] = array('id' => 'optionone',
    'title' => MODULE_SHIPPING_BEZONE4_TEXT_WAY,
    'cost' => MODULE_SHIPPING_BEZONE4_COST);

    $methods[] = array('id' => 'optiontwo',
    'title' => MODULE_SHIPPING_BEZONE4_TEXT_WAY2,
    'cost' => MODULE_SHIPPING_BEZONE4_COST2);

    $this->quotes['methods'] = $methods;


    Everything seems OK on "Step 1 of 3 - Delivery Information". My new radio options show up and I've checked the code and their values seem good.

    The problem I am having occurs on "Step 2 of 3 - Payment Information". The shipping option and price show the title and price of the first appearing radio option in my clone no matter which option is checked.

    (For example, if there are three options A,B,C, and B or C is checked on "Step 1 of 3" - "Step 2 of 3" shows A as what was checked.


    I cannot for the life of me figure out why this is happening and any help would be greatly appreciated.

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

    Default Re: Trouble cloning - incorrect values passed to the checkout_payment page

    The "flat" module was never built for multiple choices. Thus you may need to look at another module for inspiration on what additional changes you'll need to make to accommodate for multiple selections to remember what was chosen.

    USPS generates a list of radio buttons based on available services, and then remembers the selected choice between pages. You might find some helpful code in that module, which you could adapt for use in your custom module.
    .

    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.

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Trouble cloning - incorrect values passed to the checkout_payment page

    You might peek at these Flat modules in the Downloads:
    http://www.zen-cart.com/index.php?ma...1&keyword=flat

    That was a search on:
    flat
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #4
    Join Date
    Aug 2008
    Posts
    2
    Plugin Contributions
    0

    Default Re: Trouble cloning - incorrect values passed to the checkout_payment page

    Thanks a for the quick replies.

    I tried building a clone off of the USPS module but had the same problem with the shipping page in that it was not passing the correct options to the checkout/payment page. But that did steer me in the right direction.

    I checked out a few of the modules on the page suggested by Ajeh and the "static list" module ended up being exactly what I was looking for. =)

    Thanks again to both of you!

    Bjorn

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Trouble cloning - incorrect values passed to the checkout_payment page

    Glad that one of those was able to help you ... thanks for letting us know what solution worked best for you ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. v151 Values on Checkout_Payment are not retained after error
    By osulywan in forum General Questions
    Replies: 2
    Last Post: 10 Aug 2015, 06:04 PM
  2. v139h Incorrect state abbreviation being passed to ???
    By JeffLC in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 12 Feb 2015, 03:03 PM
  3. v152 Incorrect Sub-total and Total amount during checkout_payment page
    By ZkullGraveAce in forum General Questions
    Replies: 4
    Last Post: 10 Jan 2014, 02:45 AM
  4. Trouble cloning UPSXML
    By getyler2 in forum Addon Shipping Modules
    Replies: 3
    Last Post: 24 Aug 2011, 09:28 PM
  5. PayPal IPN: Incorrect billing info passed over
    By Ked in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 6 Nov 2007, 04:49 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