close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

DoubleCount error - we think at PayPal

Thread began 2/27/2020 12:51 pm by Nathon Jones Web Design | Last modified 2/28/2020 12:20 pm by Nathon Jones Web Design | 80 views | 8 replies

Nathon Jones Web Design

Sorry, do I need to change the session_id() reference to be the name of the session or should it just be left as session_id()?

Where I'm confused on this is that the Add to Cart behaviour has this for people who are new customers:

$ATC_itemID = $_POST["eCartSMC_1_ID_Add"];



The itemID, in the above instance, is being populated by this:

<input type="hidden" name="eCartSMC_1_ID_Add" value="<?php echo($rsEDITFORM->getColumnVal("SMCformID")); ?>">



However, for returning customers it's this:

$ATC_itemID = $_SESSION["eCartSMC_OrderID"];



Which is populated by the session value eCartSMC_OrderID.

We have two different tables with the following primary key fields...
1) Forms (SMCformID)
2) Orders (SMCorderID)

Customers complete the form - it inserts a new record in the Forms table with a unique SMCformID and a session value of NEWformID - and when they press the "Finish" button on the last page of the form, it creates a new record in the Orders table with a unique SMCorderID and a status ID indicating that payment is outstanding.

The INSERT behaviour for the Orders table creates the following session value:
$InsertQuery->saveInSession("eCartSMC_OrderID");

Once that's done, the customer is presented with the Add to Cart button. Should the Add to Cart behaviour actually have this for itemID?:
$ATC_itemID = $_SESSION["eCartSMC_OrderID"];

...and for returning customers:
$ATC_itemID = "". $rsEDITFORM->getColumnVal("SMCorderID") ."";


This is all on the assumption that $ATC_itemID is the unique ID that's passed to PayPal, however I'm not clear on that. SMCformID is the only product that should be able to be added to the cart, so I'm wondering if, actually, it's the NEWformID session that should be the $ATC_itemID?

Hoping that you can help me un-muddle this.
Thank you.
NJ

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...