ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Simple Commerce - Updating purchase causes error

September 27, 2012 11:05am

Subscribe [2]
  • #1 / Sep 27, 2012 11:05am

    madebycloud

    13 posts

    Trying to update a purchase, within the Simple Commerce module, displays the following PHP errors.

    ExpressionEngine version: 2.5.3

    A PHP Error was encountered
    
    Severity: Notice
    
    Message: Undefined offset: 1
    
    Filename: simple_commerce/mcp.simple_commerce.php
    
    Line Number: 1276
    A PHP Error was encountered
    
    Severity: Warning
    
    Message: Cannot modify header information - headers already sent by (output started at /Users/joshuabaker/Dropbox/Work/Projects/NB Studio/Typo Circle/Website/system/codeigniter/system/core/Exceptions.php:170)
    
    Filename: libraries/Functions.php
    
    Line Number: 806
    A PHP Error was encountered
    
    Severity: Warning
    
    Message: Cannot modify header information - headers already sent by (output started at /Users/joshuabaker/Dropbox/Work/Projects/NB Studio/Typo Circle/Website/system/codeigniter/system/core/Exceptions.php:170)
    
    Filename: libraries/Functions.php
    
    Line Number: 402
  • #2 / Sep 27, 2012 3:35pm

    Kevin Smith

    4784 posts

    Hi madebycloud,

    In an unmodified version of this file from 2.5.3, this line is referring to the subscription_end_date part of the purchase data array. Could you add a var_dump() after $data is declared there and let me know what the output is for the purchase that throws the error? Should look similar to this:

    $data = array(
           'purchase_id'  => $_POST['purchase_id'][$id],
           'txn_id'   => $_POST['txn_id'][$id],
           'purchase_date'  => $_POST['clean_purchase_date'][$id],
           'subscription_end_date' => $_POST['clean_subscription_end_date'][$id],
           'member_id'   => $_POST['clean_screen_name'][$id],
           'item_id'   => $_POST['item_id'][$id],
           'item_cost'   => $_POST['clean_item_price'][$id],
           );
    
       var_dump($data);

    Thanks!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases