small medium large xlarge

Generic-user-small
25 Mar 2009, 15:14
bradd Bezaire (1 post)

Can anyone point in the right direction as to how I’d go about adding colors and or sizes to my store app? I have a few foggy ideas but it be great to do it the proper way.

Generic-user-small
27 Mar 2009, 21:30
Richard Delph (8 posts)

Remember: there’s no proper way to do things, every problem has multiple solutions. One way to implement colours/sizes would be to create product attributes and product attribute options models and then you need some mapping facility to select options for specific items. This is the simple way if you don’t need stock control with it!

Cheers Rich

28555da_pragsmall
29 Mar 2009, 00:08
David Wilbur (49 posts)

bradd,

colors might be best handled in the css file, for example in depot example if you go into public/stylesheets/depot.css you will find in that file a section that has the following, which is relavent to the header that has the text ‘Pragmatic Bookshelf’ :

#banner {
  background: #9c9;
  padding-top: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid;
  font: small-caps 40px/40px "Times New Roman", serif;
  color: #282;
  text-align: center;
}

if you were to change that to say the following then it would be a blue background and red text.

#banner {
  background: blue;
  padding-top: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid;
  font: small-caps 40px/40px "Times New Roman", serif;
  color: red;
  text-align: center;
}

i would recommend that you find some tutorials on css to understand that better.

there are so many things that have sizes, i am not sure what you are referring to. but, if your referring to text font sizes then i would point you at the css file again.

hope that helps, dave

Generic-user-small
29 Mar 2009, 03:11
Richard Delph (8 posts)

Dave I think he’s talking about product attributes seeing as we’re talking about the app e.g. t-shirts have multiple colours and/or sizes. It’s something that I racked my brain over for years, and in that time I’ve tried multiple solutions but the hardest thing I found was tying these different attributes in with the stock control system. Would love to see how other people deal with this problem…

Cheers Rich

You must be logged in to comment