Jump to content

Groups & Attributes II


Recommended Posts

I've seen another post with the same title but it didn't quite answer my problem.

 

I've setup a site, it sells t-shirts, each colour has its own size however when you add to cart, it only shows 1 size as the description and reference code:

 

http://trybalrugby.com/shop/category.php?id_category=5

 

I am using 1.3.7.0 as upgrading to 1.4 messed up my theme.

 

Any ideas on what is causing this problem?

Link to comment
Share on other sites

U must add two groups: sizes and colors, and for each size made combination. For each combination u must add two groups!

 

 

Size:m,color:black

Size:m,color:green

Size:m,color:red

Size:xxl,color:black

Size:xxl,color:green

Size:xxl,color:red

Link to comment
Share on other sites

You broke the attribute structure in your theme.

 

PS expects the drop downs to be inside

<div id="attributes">....</div>

 

The code that handles the combination selection on the product page (function findCombination in /themes/theme_name/js.product.js) is looking for the attribute drop downs inside the mentioned div, since it doesn't exist in your site, it does not pass the proper id_product_attribute value to the cart page.

Link to comment
Share on other sites

You broke the attribute structure in your theme.

 

PS expects the drop downs to be inside

<div id="attributes">....</div>

 

The code that handles the combination selection on the product page (function findCombination in /themes/theme_name/js.product.js) is looking for the attribute drop downs inside the mentioned div, since it doesn't exist in your site, it does not pass the proper id_product_attribute value to the cart page.

 

ok, where can I get the code back? and where do i put it?

I'd say I don't remember deleting anything, but anything is possible.

 

Thanks for the comments so far. Hopefully I'll get this sorted soon

Link to comment
Share on other sites

Get a copy of product.tpl from the default PS theme (if you don't have it, download a copy of PS).

 

Compare that file to the one from your theme (you can use a program called Beyond Compare), and make sure the code for the attributes match.

Link to comment
Share on other sites

thanks.

I got Beyond Compare and looked at the two files, moved info from the clean file to the tainted one and it didn't make a difference, so i uploaded the clean file and sure enough, when you add to cart, it displays the correct info, however it screws up the layout:

 

odd2.jpg

 

I'm using firebug to see where or what the classes are that have been changed, but i don't see anything. I know I've added a div, but otherwise the rest should be the same. How the 2 files were so different is beyond me too.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...