Another Question about Custom Templates

General ShopSite user discussion

Another Question about Custom Templates

Postby 8900200 » Wed Oct 31, 2007 6:49 am

Is it true that for a page to include store data and/or links like Cart Totals that it needs to be uploaded into the store and published? I had plans to allow my client to edit some basic pages(about us, etc) in an external HTML editor, but would like to have these pages include a cart total if they've begun shopping.

I suppose I could have them edit a page template that is prepped explicitly for a single page, but then I'd end up with 10 of those and they'd be in the Templates directory which feels a little risky letting them have access to those files. Or is this a common thing to do? I'd rather not use the Text fields in the Page content areas because we have a bit of layout happening on each page. Though this may be the recommended method for editing pages like this?

Thanks
Rich
8900200
 
Posts: 47
Joined: Tue Oct 23, 2007 2:12 pm

RE: Another Question about Custom Templates

Postby ShopSite Lauren » Mon Nov 05, 2007 10:17 am

It sounds like you are wanting to add a mini cart type feature to your store pages. If your ShopSite store is on the same domain as your actual store, then you would be able to add the JavaScript for the mini cart on your pages.
http://www.shopsite.com/help/8.3/en-US/ ... ples1.html

-Lauren
ShopSite Lauren
 
Posts: 889
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT

Postby 8900200 » Mon Nov 05, 2007 10:26 am

Thanks Lauren - but can I have the mini cart JS code work on a non-store page? I'm assuming that it would need to be on the same domain. These would be pages like the index.htm which isn't going to be touches by SHopSite.

I am thinking this won't work now after seeing the the minicart code, which I think did have some custom tags in it. Or is there a way to do it without the custom tags? Sure would be nice since I have them editing in another program, and won't know how to upload custom temples and all.

Rich
8900200
 
Posts: 47
Joined: Tue Oct 23, 2007 2:12 pm

RE: Another Question about Custom Templates

Postby ShopSite Lauren » Mon Nov 05, 2007 11:18 am

Yes you would be able to put the JavaScript code on a nonShopSite page. And if you do this, the page you put the code on does need to be on the same domain because the mini cart uses cookies.

On the page below, where it gives examples of the JavaScript, it should not have any ShopSite tags in it. You should be able to just copy the code and paste it onto your store pages. You would however need to add your store information, the cart URL and the serial number. You can get your store serial number by going in your ShopSite store to Preferences > Hosting Service. You can get the cart URL by viewing the code for one of your OrderAnywhere buttons (Merchandising > OrderAnywhere).
http://www.shopsite.com/help/8.3/en-US/ ... ples1.html

-Lauren
ShopSite Lauren
 
Posts: 889
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT

Postby davee123 » Mon Nov 05, 2007 1:22 pm

One suggestion is to use something like an IFRAME on the pages that aren't on your domain. That may solve the issue since you don't have access to cookies directly.

Effectively, you come up with a "Page" on your ShopSite domain that generates *ONLY* the Shopping Cart content that you want to appear on the off-site pages. Then, on the stuff that's not on your domain, just use an IFRAME that points to your page. You should be able to manipulate the IFRAME sufficiently so that it looks more-or-less embedded in the page with CSS.

DaveE
davee123
 
Posts: 8
Joined: Tue Oct 09, 2007 7:56 am
Location: Massachusetts, USA

Mini Shopping Cart

Postby Larrrry » Mon Nov 05, 2007 3:01 pm

I am trying to insert the javascript for a mini shopping cart into my customized page, but it seems not to recognize the cookie. It prints out the Shopping cart title and the shopping cart graphic but when it gets to the "if (start == -1) //No cart cookie" line in the javascript it tells me there is no cookie (or can't find it). I go to the checkout page and the items are there but not on my page. The serial number is correct.

In the Commerce Setup>Order System>Layout Info> I've turned the Mini Shopping Cart switch both on and off. It doesn't work either way I have it. It does work on the store generated pages, but not in my customized pages.

So what am I missing and where?
Larrrry
 
Posts: 2
Joined: Mon Nov 05, 2007 2:46 pm

Postby Jim » Mon Nov 05, 2007 3:55 pm

Are your store pages and shopping cart at the same domain name, if not the minicart will not work because it relies on cookies and they can only be read by the domain that created them.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah


Return to User Forum

Who is online

Users browsing this forum: No registered users and 104 guests

cron