Store ID, View Cart button and Registration button

Questions and answers about ShopSite Custom Templates

Store ID, View Cart button and Registration button

Postby Vernontnh » Wed Jun 30, 2010 11:44 am

Three questions. I'm using shopsite 10, pro version.

how do I find my store id for the "View Cart" and "Customer Registration" buttons? I found one reference that looked like it in the Authorize.net configuration window, but that's the only place I could find it. Also, would be nice to know how many characters the thing is, because I'm almost sure there is a string of characters right next to what I presume is the store id that I don't think belong.


Regarding the two buttons I need link code for:

Customer Registration: Just need to know the code that is needed to link. IT is obviously not the correct code that is given in the Customer Service Customization window.

View Cart: Needs to link to the cart. Can't figure out how to do that either.

HELP!
Vernontnh
 
Posts: 59
Joined: Wed Nov 05, 2008 6:50 am
Location: USA

Postby Jim » Wed Jun 30, 2010 12:46 pm

1. Go to Merchandising > Order Anywhere to get links for add to cart and view cart buttons. The Storeid will be in those links. It should be "storeid=*nnn..nn" up to the & character. The the "n"s represent some number and the length can vary.
Each time the storeid is generated it will be different but any one that you get from your store would work.

2.
. IT is obviously not the correct code that is given in the Customer Service Customization window.

Why do you say that it isn't the correct code?

3. See 1. above.


If you are using custom templates then you need to use the template tags for the above items.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby Vernontnh » Wed Jun 30, 2010 1:28 pm

Hi Jim:

THanks for the info. I tried putting that long, long string of code from shopsite that supposed to be to create a link to the cust. reg. page and it didn't work.

Of course I didn't know exactly where to put it, so in Dreamweaver, I clicked on the button graphic and put it in the "link" window, which automatically gives it the href...string and ends it with quotations and greater than sign.

When that didn't work, I removed all the code that dreamweaver puts in to specify a link, and just left the code in place. But that didn't work either.

vernon
Vernontnh
 
Posts: 59
Joined: Wed Nov 05, 2008 6:50 am
Location: USA

Postby Jim » Wed Jun 30, 2010 3:23 pm

Maybe dreamweaver is adding or subtracting something from it. I put the code from my store in a product description field in ShopSite and both the Register and Signin links worked. Try viewing the source after you publish your page and see if it matches what you put in dream weaver. I usually put a long string of some characters just before and after code that I want to see how it looks so it is easy to find on the page. For example:
Code: Select all
<br>
JIMJIMJIMJIMJIMJIMJIMJIMJIm<br>
<script type="text/javascript" language="JavaScript">
function DisplayLogName(name) {
  var cookies=document.cookie;
  var start = cookies.indexOf(name + "=");
  var name = "";
  var start1;
  var end1;
  var tmp;
  var signed_in = -1;

  if (start != -1) {
    start = cookies.indexOf("=", start) +1;
    var end = cookies.indexOf("|", start);
    if (end != -1) {
      signed_in = cookies.indexOf("|yes", start);
      name = unescape(cookies.substring(start,end-1));
      document.write("<b>" + name + "</b>");
      if (signed_in != -1) {
        document.write("<br>");
        document.write("•<a href=\"http://my.domain/cgi-bin/sc/order.cgi?func=3&storeid=*109c98b32412b3a10b24&html_reg=html\">View/Edit Account</a>");
        document.write("<br>");
        document.write("• <a href=\"http://my.domain.com/cgi-bin/sc/order.cgi?func=4&storeid=*109c98b32412b3a10b24&html_reg=html\">Sign Out</a>");
        document.write("<br>");
      }
      else
      {
        document.write(" - You are no longer signed in<br>");
      }
    }
  }
  if (signed_in == -1) {
    document.write("• New Customer? <a href=\"http://my.domain.com/cgi-bin/sc/order.cgi?func=1&storeid=*109c98b32412b3a10b24&html_reg=html\">Click here to Register</a>");
    document.write("<br>");
    document.write("• Returning Customer? <a href=\"http://my.domain.com/cgi-bin/sc/order.cgi?func=2&storeid=*109c98b32412b3a10b24&html_reg=html\">Click here to Sign In</a>");
    document.write("<br>");
  }
}
DisplayLogName("ss_reg_0000001001");
</SCRIPT><br>
JIMJIMJIMJIMJIMJIMJIMJIMJIm<br>


Try just putting it in as text on the dreamweaver page and see if it works. Note that it will have to be from your actual store and not a demo store or it won't go to the right place.

Jim
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby Vernontnh » Thu Jul 01, 2010 5:47 am

Thanks Jim. It's all working now.

Best regards,

Vernon
Vernontnh
 
Posts: 59
Joined: Wed Nov 05, 2008 6:50 am
Location: USA

reg/account button--need simple href code

Postby Vernontnh » Mon Jul 12, 2010 8:45 am

Hi Jim:

Now I see. That code shopsite gives you generates the code for the linking phrase as text.

That's not at all what I want/need. I just need a simple href type link that will take me to the loging/register page.

See my other site. I was able to do that for that site, but this one, I have no idea how to make it work right....my other site where it is working is: http://www.pogapparel.com. The links to both "account" and "register" are working with a simple href link. You'll see them in the purple area upper right side of the masthead.

That's what I need for this site: http://www.stellaandjames.com/store/charms.html

Thanks,

Vernon
Vernontnh
 
Posts: 59
Joined: Wed Nov 05, 2008 6:50 am
Location: USA

Postby Jim » Mon Jul 12, 2010 9:17 am

If the links on the one store are working why not just copy those links, replace the domain name and storeid and use them on the other site?

The problem with just using that type of link is that it does not take advantage of other information provided when using the shopsite template tags such as displaying the shopper's name, changing the signin link to sign out, etc.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby Jim » Mon Jul 12, 2010 10:22 am

The link to My Account at the top of http://www.stellaandjames.com/store/charms.html has an incorrect url. It is going to
/shopsite_sc/sc/order.cgi...
but it should be going to
cgi-bin/sc/order.cgi...
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

link you just sent me for account page

Postby Vernontnh » Mon Jul 12, 2010 10:57 am

Hi Jim:

I went to the shopping cart, then clicked the reg link at the top to get the link i wanted.

But maybe this isn't the general link, but is one generated by the system as uniquely mine having come from MY shopping cart page. It works for me.

Are you saying that this link does not work? Please try again, now that I have the same link throughout the site. If it does not work, then I am still at a loss for figuring out what the link should be.

Thanks,

Vernon
Vernontnh
 
Posts: 59
Joined: Wed Nov 05, 2008 6:50 am
Location: USA

further about the labrinth of shopsite

Postby Vernontnh » Mon Jul 12, 2010 11:12 am

Hi Jim:

I bet I've lost at least 100 non billable hours on this project over the last 3 months trying to deconstruct the labrinth of templates, includes, CSS...etc.

If you're starting with a template, it is very difficult to figure which file, the template, the multiple includes or the CSS, or other CSS within an include, etc that is controlling things.

I think this is a major weakness for Shopsite, and i would recommend you consider providing some deconstructed code for those of us that can look at the functional part of the code that controls the actual database, etc. and build our own CSS, not having it all interpursed and connected together.

Something like:

Here's the code you need to get all your reg pages functioning together:

CODE

Here's a header include. We didn't put some of the functioning code here, and some in the actual template file, because we knew that would be hard to understand. Instead, we just have the reference to css and graphics in this file.Plain and simple.

Here's the footer include--same situation as above. All the code that needs to work in the templates is together in the template file. not placed here and there.

You want a background color, a ruled box around your page content, Fine. Go for it, but we've left all that out and just given you the fuctioning code you need so that it works with our database, processing, etc.

I bet a lot of people would be grateful for this.

And by the way, the other resource that provides code, is fine, for those who understand shopsite code and can string it all together, but for most designers, that's impossible.
Vernontnh
 
Posts: 59
Joined: Wed Nov 05, 2008 6:50 am
Location: USA

Postby Jim » Mon Jul 12, 2010 1:55 pm

The My Account link on the main page is not correct as it will always take the person who logs in to the specific shopping cart that you were in when you created that link, sbid=SSMSB1278942077.90921. I don't think that is what you want to happen.
Again you need to use the ShopSite template tag [-- RegistrationSignIn --] to get the proper login url and other settings needed. There is different code executed based on whether the person is trying to login from a store page or the shopping cart screen and the appropriate methods are needed for it to work.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah


Return to Custom Template Questions

Who is online

Users browsing this forum: No registered users and 122 guests