Miva Merchant Community Forums

Page 2 of 2 FirstFirst 1 2
  1. #11
    Join Date
    Mar 2006
    Posts
    11,125

    Default Re: Query string variables to custom field

    What is supposed to happen with this? Are you just sending data to a survey program? Or are you expecting to see a return value from that php file? If you want to see a return, you have to have &mvte:global:survey; to display the result at the end.

  2. #12
    Join Date
    Apr 2010
    Posts
    157

    Default Re: Query string variables to custom field

    No return value. The survey is on a 3rd party site. When they complete the survey they are sent to the Miva store ACNT page and passing the surveyid parameter which lets us know they have completed the survey. We wanted to then check and if they completed the survey AND create a new account we credit them $50. We looked at a few options but since we don't know enough Miva scripting, and this is just a one time application, we thought we'd use callurl to pass a php page the surveyid, customer number and maybe the name of the created account and write it to a database (we have someone who knows php) and then we can manually add the credit to those who create an account via this survey.
    Last edited by habreu; 01-27-13 at 10:12 PM.

  3. #13
    Join Date
    Mar 2006
    Posts
    11,125

    Default Re: Query string variables to custom field

    Your logic is wrong. In your initial post you have g.Action EQ 'ICST'. That only happens at the point where a new customer saves their customer info by clicking the save button. The action in that form is ICST (insert customer). Once that has been done it cannot be done again later. Hence, you can't send them to complete a bunch of data at some php survey and return that data to create the same account again. You have to update a custom field for an existing customer. Hence the customer would need to be logged into miva, go off to the php survey, fill in the survey, then return from the php survey. The return could insert the code into the custom customer field of the currently logged in customer.

    Alternatively, you could send them to the php first. The php would post back to your store where they could create an account. For example http://www.yourdomain.com/mm5/mercha...cialcode=12345 Then on the ACAD screen you would have a form input like <input type="hidden" name="specialcode" value="&mvte:global:specialcode;"> Then on the page where the customer lands after saving the account, e.g. ACLN or ACED or SFNT or whatever your store is set to, you would have the tool kit coding to save the specialcode value to the custom customer field or to trigger a discount coupon.

  4. #14
    Join Date
    Apr 2010
    Posts
    157

    Default Re: Query string variables to custom field

    Thanks for your responses Bill and Bruce. Took a few hours but I was able to sort it out on the ACAD screen and with the hidden input.

  5. #15
    Join Date
    Jun 2009
    Location
    Houston, Texas
    Posts
    282

    Default Re: Query string variables to custom field

    shouldn't it be <input type="hidden" name="surveyid" value="&mvt:global:surveyid;">

    not
    "&mvt:global:surveyid;">
    Scott Bronstad
    Marketing
    Star Time Supply, Co. Inc.
    http://store.startimesupply.com

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •