Global Cross-Sell Missalignment

Questions and answers about ShopSite Custom Templates

Global Cross-Sell Missalignment

Postby JCat » Sun Feb 14, 2010 10:05 pm

I'm using the new sleek template, and something odd is happening. I have global cross-sell turned on in the global cross sell options. When I check off "Check here to display the global cross sell products" on a page, the products appear in a column under the categories. This is exactly where I want them appearing, however, they are completely misaligned. If I'm not mistaking, I believe they are automatically left aligned. This is not good, as products with short names are closer to the left of the column, while longer named products are hanging out in the middle. I tried changing product alignment in the layout info, but that just slightly shifts the products around with just has horrible results. I don't even think that option is meant for cross sell products.

The weird thing is, if I turn on Cross Sell in the checkout page (where I don't want it), the products are centered down the left column perfectly. I did create a new template based on sleek, and was able to have them centered, by adding a little code (I'm not much familiar but got it to work), however they are not coming up 'randomized' which I selected under the cross sell option, So, the good news is, I have them centered, the bad news is, the same 6 products out of 30 selected display without randomization. Shouldn't this all work without extra scripting, since this seems to be an option which the template apparently supports by default? Thank you
JCat
 
Posts: 14
Joined: Mon Oct 22, 2007 8:49 pm

Global Cross-Sell Missalignment - Fix

Postby ShopSite Lauren » Tue Feb 16, 2010 4:00 pm

You can paste the following into the header or footer fields (or somewhere that is on all pages).

<style type="text/css">
<!--
table.gcs_table, table.gcs_product_table {
margin: 0px auto;
}
table.gcs_product_table td {
text-align: center;
}
-->
</style>
ShopSite Lauren
 
Posts: 889
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT

Postby JCat » Tue Feb 16, 2010 11:11 pm

Hey thanks Lauren -

I popped the CSS into the header, and now it's all centered without having to use a modified template. Unfortunately, it's still not randomizing.

Am I correct that the Global Cross Sell's random function in "display order" means that every time a visitor hits your page, it randomizes the cross sell products? Or, does it just throw them up in a randomized order the first time, but they remain in that position from that point on?

It appears you can select as many Global Cross Sell Items as you want, and can have up to 9 shown at once so I'm assuming the random function will pull in different products each reload of the page.

Thanks again for any advice
JCat
 
Posts: 14
Joined: Mon Oct 22, 2007 8:49 pm

Global Cross-Sell Random Function

Postby ShopSite Lauren » Wed Feb 17, 2010 12:49 am

Actually the 'random' sort function is only for those items being displayed on the shopping cart screen. Since the pages are static pages (which are better for search engines and typically load quicker) the content on those pages, including the cross sell items, will not change. I believe that each time you publish your store there will be a random set of global cross sell products that is displayed, but those products will remain there until the next time you publish.
ShopSite Lauren
 
Posts: 889
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT

Having a similar issue

Postby arta!!ack » Mon Mar 29, 2010 4:02 am

Hi.

I am having a similar issue to JCat.

The fix has worked for product image and product name, but I have "add to cart" and "price" and these will not line up at all.

http://www.actioncity.co.uk/index.html


I assume this can be fixed in the same way, with a bit more code.

Arthur.
arta!!ack
 
Posts: 47
Joined: Wed Jun 13, 2007 2:23 am
Location: Lancashire UK

Centering Price and Add To Cart for Cross Sell

Postby ShopSite Lauren » Mon Mar 29, 2010 11:04 am

You could try adding the following CSS:

.gcs_product_purchase, .gcs_product_purchase td {
text-align: center;
}

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

Postby arta!!ack » Tue Mar 30, 2010 1:34 am

Thanks Lauren, but that did not do the trick, it did not seem to have any effect.

I cannot work out what is going on sadly.

I am using sleek for the pages and the price and add to cart buttons are not lined up at all.

http://www.actioncity.co.uk/index.html

I am using gradient1 for more information product pages and the global cross sell is "almost" there, but not quite. As can be seen on this page.

http://www.actioncity.co.uk/More_About_ ... Swing.html

Arthur.
arta!!ack
 
Posts: 47
Joined: Wed Jun 13, 2007 2:23 am
Location: Lancashire UK

Postby arta!!ack » Thu Apr 01, 2010 3:37 am

Finally after a lot of investigating, and lauren`s help earlier, I have managed to solve it.

I have pasted this into the header in the layout prefs.

Now they all line up perfectly.

<style type="text/css">
<!--

table.gcs_table, table.pcs_table {
width: 100%;
margin: 10px auto;
}
table.gcs_table td, table.pcs_table td {
width: 33%;
text-align: center;
}
td#gcs_page, td#gcs_mi, td#pcs_mi {
padding: 8px;
font-size: 1.5em;
background-color: #[-- STORE.SC_ShadeColor --];
}
table.pcs_table td a {
display: block;
}

-->
</style>

Arthur.
arta!!ack
 
Posts: 47
Joined: Wed Jun 13, 2007 2:23 am
Location: Lancashire UK

Postby Jim » Thu Apr 01, 2010 7:30 am

Text fields in the backoffice such as "header in the layout prefs" will not be evaluated for ShopSite custom template tags. So the line
background-color: #[-- STORE.SC_ShadeColor --];
will not be evaluated for the Shade color. You can verify this by viewing the page source and the text
[-- STORE.SC_ShadeColor --]
will be displayed in the page source. Also any change you make to the shopping cart shade color on Commerce Setup > Order System > Layout info > Table Shade Color: field won't affect that area.

You can either hard code the color into the code you put in the header or move this section of code to the template file itself.
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 10 guests

cron