php / mysql god assistance needed
This is a long shot but maybe some god here will point me in the right direction.
I have 2 sites using PowerStore. One is the actual store, and one uses the product tables in the parent site to present more information about the products.
The store is here: milemarkersports.com
The parent company is here: sporthill.com
So, if a shopper goes to the branded site, sporthill, she will see pages that present the groups of products, then the individual product page: products2011.php?ProductGroup=5510
This page pulls details from the cart database.
Now, on this page, I created a list of product colors. See right side bar called colors. I did this using this:
SELECT *
FROM ps4_products
WHERE ProductGroup = $product_group
then on the page:
<?php while ( $row_thumbs = mysql_fetch_assoc($thumbs) ) {
?>
<img src="http://milemarkersports.com/store/imagesupload/thumb/<?php echo $row_thumbs['ProductThumb']; ?>" alt="" name="thumbs" width="175">
<?php
}
?>
So now client wants to add all the sizes available per product group.
Looking at the way PS has built out the options, I see this:
ProductOptions share a key with products: ProductID
ProductOptions and OptionsGroups share key: OptionGroup ID.
So, I am looking for help to get the product group, list all optiongroupname = Size, and then the optionname. Is it possible? (In my optionsname I have color names and size names)
I want to change where it shows colors to now show colors and sizes. The sizes can just be plain text above the list of color images.
Any ideas if this can be done or am I just overly hopeful.
Thanks as always.