Announcement

Collapse
No announcement yet.

Christmas present: Request a Sample capability.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Christmas present: Request a Sample capability.

    Here's how to add a link "Request a Sample" to every product.

    In your store top (the bundle of money icon) create a new product called "Sample Request".

    Set its price to £0, £0.50 or whatever you need.

    In the Prompts tab, set Other Info Question to "Product".

    In the General tab, write down the value in the Reference field (we need this later).

    Tick Hide On Website.

    That's your Sample Request product created.

    We need to create a snippet of code added to every product that simulates an add to cart with the ID of the sample product and with the Other Info field set to the requested product name.

    To do this, paste the following code into Notepad.

    Code:
    <a href="<actinic:variable name="OnlineScriptURL" value="Shopping Cart Script URL" />?SID=0&PAGE=PRODUCT&PAGEFILENAME=<actinic:block php="true">echo urlencode('<actinic:variable name="SectionPageName" encoding="perl" selectable="false" />');</actinic:block>&Q_1234=1&O_1234=<actinic:block php="true">echo urlencode('<Actinic:Variable Name="ProductName" encoding="perl" selectable="false" />');</actinic:block>&_1234.x=1&_1234.y=1">Request a sample</a>
    Change all four occurrences of 1234 to the Reference you noted down above.

    Save the amended code and copy it to the clipboard.

    Now, in your Product layout(s) paste the amended code and that will create a link "Request a sample" that will add the Sample Request product to the cart with the Other Info field set to the real product name.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    #2
    Originally posted by NormanRouxel View Post
    Christmas present: Request a Sample capability.
    It is not just a Christmas present. This is an all-time present. I wonder how this became a so simple solution for a big problem..!!

    Thank you very much

    John

    Comment


      #3
      I know this is some time on from here, but I wondered if anyone (Norman?!) may know of how to add any option values to the info being sent to the basket... i.e. if the product sample being ordered had an option that included colour then how can the info be passed to the basket that included both the product name and the option(s) selected?
      Thanks!
      Chris Adams

      Comment


        #4
        See http://community.sellerdeck.com/showthread.php?t=42290 post #5 and add the stuff in red (modified to suit your Product ID and Choices) to the link you're using.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          Thanks Norman - I see how this works (and very useful in particular instances) but it *looks* like the link would need to pre-determine the choice a user would make - whereas I would need the user to make the selection themselves from the list of choices and then the choice they selected passed to the basket (as a sample of course) showing that choice they (dynamically) selected... can this be done?
          Chris Adams

          Comment


            #6
            A drop down list and some onclick JavaScript to append the selected value to the URL would be one way to go.

            Easier route might be to have separate links - Blue Sample, Red Sample, etc.
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              Thanks Norman. I'm using generic Components > Attributes > Choices for the products anyway so these are already defined... fine for adding to the basket but with the code that you have very generously updated here it only adds the Product name to the basket as a Sample Request.
              have a look here as an example - http://www.ufitflooring.com/flooring...FR_Marina.html - do you mean then that I would need to tinker with the Layout (Drop Down Permutation List for example) adding in relevant JavaScript here to then append the value onto the end of the link?
              Can you tell this is out of my league as a front end designer?!!
              Chris Adams

              Comment


                #8
                This article is about a simple way of requesting a sample product by name only.

                What you want is much more complex and well beyond the free help I can provide here.

                Try the idea about generating seperate links and for each such link add extra informative text to the Other Info stuff.
                Norman - www.drillpine.biz
                Edinburgh, U K / Bitez, Turkey

                Comment


                  #9
                  Fair enough Norman - I appreciate yours and others help with my queries - thanks again :-)
                  Chris Adams

                  Comment

                  Working...
                  X