Hello,

was wandering if anybody out there can help me with the following:

We use a third-party shopping cart, but they dont really make it easy to be able to buy "memberships". The way we have it now, is that they buy a "membership-card" (say item code: CLUBMEMBER", which when they buy it along with other products, it automatically discounts all items by 25%... it all works pretty good. EXCEPT that we want to, at the final confirmation page, to automatically show ONLY the people that bought this membership-card "item", a registration form. So my question is: how can I track this "CLUBMEMBER" POST variable along all checkout pages, so that if AND ONLY IF customer does buy it, it will then show "registration" form.

I thought about setting a SESSION like "if POST-variable item_code exists and item_code=MEMBERCLUB" then set SESSION "CLUB", and then on confirmation page add something like "if CLUB session is set, then show registration form"...

but then I realized that woudlnt work just right, cause if customer decides to delete that CLUBMEMBER item, but leaves other products in cart, then registration form would still show up, even though customer took it off cart...

Anyways, not sure if I am making sense. In the end, I am just trying to get around their whole cumbersome ways, and simply make my own script...

Any help much appreciated!

Adrian

How much freedom do you have with this 3rd party shopping cart, cause I think that there is only one way of really knowing if the product was purchased and that is by querying the database after the purchase is made, which I think would need to be done on the thank you page.

Yeah, I figured on the confirmation page is where I would be able to "pull" or read the variable to test if exists... but the "tech-support" said there are no "variables" at that point... of course they are saying that they could "custom" develop the workings for me, but they would charge a pretty chunk of money to do it...

But there must be "something" in browser memory, cause a confirmation email is sent to customer after buying, and all corresponding info is sent in that email content, including item details.

Somebody mentioned I could just "unset" the session if item is removed from cart, which makes sense... I just need to figure out how to have script know that said item WAS removed...

I forgot to mention that I do have access to the "confirmation" page template; i can put php code there, but it just has basic html code, with other "cart" codes that get pulled but which I cant see or dont have access to. Perhaps I need to study that template again and can figure out some of this proprietary codes...

can you specify the cart you use?
is the php encrypted?
is it on your server? (do you have access to the database it uses? )
if you have access to database then you just need to figure out where and how it stores details and just use that,
if its not encrypted, even if you do not have permission to change it you could go through the code to see what it does and have better idea.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.