Forums / Templates, Stylesheets, Page Layout / Passing Variables to ZC

Passing Variables to ZC

Locked

Started by gart on 12 Aug 2006, 3:33 PM · Views: 1,580

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
12 Aug 2006, 3:33 PM
#1
gart avatar

gart

New Zenner

Join Date:
Nov 2005
Posts:
36
Plugin Contributions:
0

Passing Variables to ZC

We sell custom, made-to-order graphics and allow the custromer to select Print Only, Matted Print, or Matted and Framed Print in various different sizes. Although I have configured the necessary Option Name/Value pairs so that this COULD be done from five dropdown boxes, the more usable way is to send them to a separate page where the graphic is displayed and they can playfully select their desired mat colors and frame styles. Ideally, upon closing that window and returning to the ZC page, the values selected would be reflected in the dropdowns and, if the customer so chooses, the shopping cart.

I have already created the page with the interactive mat and frame selection. I need to know how to pass variables from that page back to ZC. Is there a WIKI doc or Forum Tutorial I've missed? If so, I am sorry (I've searched), and will pay Penance after I've finished the web site.

Thanks!

12 Aug 2006, 4:59 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Passing Variables to ZC

Something similar was posted here:Thread

DrByte:
The easiest way to send $_POST data is to generate a form and a submit button, with hidden fields containing the parameters to be passed.
As you have code access to this other page, this might assist...

Zen-Venom Get Bitten

12 Aug 2006, 10:56 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Passing Variables to ZC

It sounds like you're referring to making selections in a popup or other window separate from ZC. If the Zen Cart product page is open when the popup opens, then you could write some javascript to update the product page form fields with settings chosen prior to closing the popup.

The post Kobra referenced is useful for some of the theory if you're trying to click the add-to-cart button for the customer at some point, rather than letting them do it themselves.

.
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.

13 Aug 2006, 1:32 AM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Passing Variables to ZC

Gart,

Unfortunately, for them, they have to follow my posts with the pertinent information to correct my possible faulyt posts....keeps them on their toes...

Zen-Venom Get Bitten

13 Aug 2006, 3:42 PM
#5
gart avatar

gart

New Zenner

Join Date:
Nov 2005
Posts:
36
Plugin Contributions:
0

Re: Passing Variables to ZC

Kobra: Don't worry about it. At least you have answers to give that suggest solutions. All I have are questions.

Dr. Byte (or anyone): You've got it exactly right--the product page is still open "under" the pop-up window where the various selections are being made. Is there a thread, Wiki, or example anywhere you can point me to for a kick-start?

Thanks.

13 Aug 2006, 7:02 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Passing Variables to ZC

Gart:

the product page is still open "under" the pop-up window where the various selections are being made. Is there a thread, Wiki, or example anywhere you can point me to for a kick-start?
Not here, at least not at the present time. It's a rather advanced programming concept unrelated to the inner-workings of Zen Cart itself.
You'll want to research using javascript to update fields on other browser pages.
You could also look for other websites that do it and study the concepts they used.

.
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.