PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Select different cart66 products

  1. I'm wondering if there is a hook, etc that might help me work around this limitation with cart66... I sell prints of artwork, up to large sizes. This means my shipping costs vary widely. I love using gravity forms to select the various frame and image options, it has really been great. But when someone selects a size option, I have no way of changing the cart66 shipping dimensions.

    What I'm wondering is this... if I set up a different cart66 product for each size option, and then I could force/specify/dynamically populate which image will be used for the size, that'd work great. So, is there a way to create a Gravity form which allows me to select between different cart66 products? Basically, a form which redirects to another form...? EG: a dropdown that says small, medium, and large. Each of those options is a gravity form attached to a cart66 product. I could create a hidden/single option field which I could dynamically populate or "preselect" with which image would be used in that size.

    I realize this isn't a cart66 support forum, but you guys have been able to really nail down so many different possibilities I figured I'd ask here first.

    Posted 12 years ago on Sunday October 9, 2011 | Permalink
  2. OK... I'm "starting" to get an idea here... If I create a page for "Specific Image A"... Then, on that page, I place "Form 1". "Form 1" contains a drop down list of the available sizes. Each one of those sizes corresponds to a second page that has another form, Form "2". "Form 2" contains all the other options for the product.
    So, I've read how to use one form to redirect to a page with another, and I get that. What I don't see is how to make the "redirect" dependent on what is chosen in the "Form 1". If I select "small" in form one, I want it to redirect to a page with the form that is linked to cart66 product "small". If I select medium in form one, I want it to redirect to a form linked to cart66 product medium...
    I hope this outlines my question a little clearer...

    Posted 12 years ago on Monday October 10, 2011 | Permalink
  3. I think I just found the answer to this question here:
    http://www.gravityhelp.com/forums/topic/conditional-logic-redirect

    Posted 12 years ago on Monday October 10, 2011 | Permalink
  4. However, I wouldn't mind someone pointing me int he right direction as to how to write a custom php conditional redirect... ;-)

    Posted 12 years ago on Monday October 10, 2011 | Permalink
  5. Anyone have any advice?

    Posted 12 years ago on Tuesday October 11, 2011 | Permalink
  6. Have you tried the code here?
    http://www.gravityhelp.com/forums/topic/terms-of-conditions#post-7442

    Posted 12 years ago on Tuesday October 11, 2011 | Permalink
  7. What about in cart66 product settings in Product Variations,eg Small, Medium Frame +$2.00, Large Frame +$4.00

    Would that work for you?

    Posted 12 years ago on Tuesday October 11, 2011 | Permalink
  8. @ Chris, that looks awesome! I couldn't find that thread yesterday! Thanks so much.

    @GoodForm... AFAIK Cart66 doesn't allow different shipping per variation, yet... so I would need separate products created in order to have different shipping options.

    Posted 12 years ago on Tuesday October 11, 2011 | Permalink
  9. OK. I got the redirect working using the thread that was referenced. That is so cool.

    One more question though, is there anyway to get the redirect to work, while also passing other data? Like, using "size" to control the redirect, but also pass "color"? EG using something like this: imagesize={Size:1}&imagecolor={color:2}
    I can get the redirect working, but I can't seem to dynamically populate with the additional string info...

    Posted 12 years ago on Thursday October 13, 2011 | Permalink
  10. I'm guess it is because of the separate 'redirect" php file, it isn't passing values to the new url. So, now I'm wondering, can I add that in on the php side. Like where $size = $Get_('imagesize'); could I also get a term for another field value, and then append it to the url within the switch?

    Posted 12 years ago on Thursday October 13, 2011 | Permalink
  11. Making progress, but could still use some help. I've been able to add a second $_GET to the redirect template, which accurately gets the second field I'm passing in the query string.
    I added it in the switch, something like this:

    $size = $_GET['imagesize'];
    $image = $_GET['imageselect'];
    	switch ($size)
    	{
    		case "8 x 10 inches":
    		// if 8 x 10 inches redirect to the following page
    		header("Location: http://my-domain.com/8-x-10-canvas-print/?image=$image");
    		break;

    And the url works... I end up with a url like this: http://my-domain.com/8-x-10-canvas-print/?image=field-label-of-the-field-i-want
    It shows the label, not the value. Which I don';t really care what it shows. WHat I do care about, is that the"Image" field on that page is not populating. The "allow dynamic..." is selected, and the parameter is set to "image" but it doesn't populate or select.

    I feel like I'm so close and yet so far...

    Posted 12 years ago on Thursday October 13, 2011 | Permalink
  12. Just a heads up with anyone with Cart66 questions... we aren't familiar with Cart66 and don't provide support for the integration. The Cart66 development team created the integration so any questions on the capabilities and how to do things that relate to Cart66 will need to be directed to their support team.

    Posted 12 years ago on Thursday October 13, 2011 | Permalink
  13. Carl, my question really has nothing to do with Cart66... I am trying to use Gravity Forms ONLY in this procedure... Cart66 only set the limitations/parameters for what I need to do. Nor has the inability for this to work so far for me got anything to do with Cart66. In this scenario, Cart66 would only be involved after the FINAL form submission. At which point, I wouldn't ask you guys for any help.

    I'm trying to use a Gravity form to select specific pages/posts which have a separate form on them. I've accomplished this. However, I would also like to pass some values/data from that original form to the next after the redirection. If you like, I will go back and edit out any mention on Cart66 and my question still stands.

    Posted 12 years ago on Thursday October 13, 2011 | Permalink
  14. I was simply letting other users who may read this thread (like the one above) that Cart66 integration isn't something we are familiar with so any Cart66 questions would be best left to their support team.

    If you want to pass values from one form to to a redirect then you:

    - Edit the form you want to pass data from
    - Select Form Settings
    - Select Confirmation
    - Choose Redirect for the confirmation
    - Enter the URL you want to redirect to
    - Check the "Pass field data via query string" checkbox
    - Build your query string using merge tags
    - Here is an example: http://i.imgur.com/SLf2z.png

    When using merge tags keep in mind that the "Insert form field" only outputs the default merge tag. There are other options you can use. By default merge tags output the friendly value of the field if it has one (ex. drop down, radio button and checkboxes have a name and a value). Merge tag options are documented here:

    http://www.gravityhelp.com/documentation/page/Merge_Tags

    Now you would configure the second form you are redirecting to so that each field you want to populate dynamically has that option selected in the Advanced tab and then the parameter name you assign to each field is the parameter name you are using to pass data to it via the query string.

    If you need a custom conditional redirect, that's not something Gravity Forms does so it's a customization. We can give you a high level overview of what you need to do, but we can't write the code for you. It appears you already have the basics down.

    If your problem is you need to pass the data, then you need to pass the data via the query string in your redirect to the second form just like the data is being passed from the first form to your custom redirect page.

    - Form 1 redirects to custom confirmation page passing field data via query string

    - Custom redirect page redirects to form 2 passing field data via query string it gets from the query string

    - Form 2 dynamically populates fields using query string values

    As for the image fields... you can't dynamically populate them. Upload fields aren't like standard fields. You can't pre-populate an upload field. The browser doesn't allow it. If the browser allowed you to pre-populate the value of an upload field that would be a security issue because you could easily use that to get files from the user without them realizing it by pre-populating hidden upload fields. So this isn't something that you can do.

    Posted 12 years ago on Thursday October 13, 2011 | Permalink
  15. Thanks, this is really helpful. The first half of what you said I've got down. Except the documentation about merge tags, I had missed that, I'll look into it now and see what I've missed.

    I had a feeling this might be a cause of some confusion... the parameter "image" won't actually be an image file. It is the specific label / parameter name of my dropdown field. The site will sell art work with various sizes and framing options, so image, doesn't apply to a filetype or field type, but a choice in a dropdown: IE, your "image" could be Mona Lisa, Sistine Chapel, American Gothic, etc. I'm not trying to actually pass upload field data or an actual image.

    I know my explanations earlier weren't the clearest. I am going to set up a page to sell a particular painting. One of the ones I'm selling is called "Vilnius" The first form, called Choose Size, and allows customers to select the size they would like to purchase. On this same form will be a dropdown with a list of ALL the images I sell. I will use shortcodes to preselect which image it will be.
    [gravityform id=25 name=ChooseSize field_values='image=vilnius']
    This way, I can already determine which particular picture they are buying, they only can change the size. This allows me to create fewer forms as I won't need a form for each painting in each size.

    This form will then redirect to another page for all pictures of that size, with a form called "Select a Frame". On this form, I have created another dropdown, visible only to admin, where I need to pass that "preselection" of the painting "Vilnius" from the first form, through the redirect, to this form.

    I certainly don't expect anyone to write my code, you guys have already posted most of what I needed which is a heck of a lot more helpful than the forum for the other plugin I mentioned in this thread. I've been able to use what Chris pointed to, to make most of this work. My concern is that there has to be a step I'm screwing up or missing. Because after the redirect the url looks like it "should" work. It redirects exactly where I want it, and it shows the ?param_name=Field_name that I want, but the dropdown doesn't populate if I leave it empty, and it doesn't select the right item if I copy the exact same list. I'm jut hoping someone can see what it is I'm missing or if I'm expecting the wrong thing to happen...

    Posted 12 years ago on Thursday October 13, 2011 | Permalink
  16. If you are trying to pre-populate a drop down one thing to note is you better make sure that what you are passing in the query string matches the value of the drop down exactly.

    Can you provide an example?

    Maybe provide a link to your 2nd form that includes the correct parameter that isn't getting populated so I can take a look at the form?

    Posted 12 years ago on Thursday October 13, 2011 | Permalink
  17. I'm sending the page for the second image in my list, Hyla.
    http://divinemercyimages.com/uncategorized/new-hyla/

    Here is the target of the redirect, for the first size option, this is where the 2nd form is:
    http://divinemercyimages.com/8-x-10-canvas-print/?image=Hyla%20Divine%20Mercy%20Image

    And here is the code from my redirect file:
    http://www.pastie.org/2691018

    Screenshot of the Redirect settings on Form 1:
    http://divinemercyimages.com/Form-1-Confirmation-redirect.jpg

    Screenshot for the Image dropdown field properties on Form 1:
    http://divinemercyimages.com/form-1-Image-Properties.jpg

    Screenshot for the advanced window on Form 1 / Image field:
    http://divinemercyimages.com/form-1-Image-advanced.jpg

    Screenshot for the Image dropdown field properties on Form 2:
    http://divinemercyimages.com/form-2-Image-Properties.jpg

    Screenshot for the advanced window on Form 2 / Image field:
    http://divinemercyimages.com/form-2-Image-advanced.jpg

    I'm starting to wonder if it isn't the %20's that are coming through on the url?
    Anyways, this is all the info on as far as I've gotten. I'm sure it is something silly I'm missing.

    Thanks again for the help.

    Posted 12 years ago on Thursday October 13, 2011 | Permalink
  18. Got it. It was a caps and or spacing issue. I can play around with the appearance now, but I've gotten it to work, as you said, making sure what the query string passes is an exact match to the targeted field. Thanks for all the help guys!

    Posted 12 years ago on Thursday October 13, 2011 | Permalink

This topic has been resolved and has been closed to new replies.