Page 1 of 1

Can anyone help? New site Big problems...........

Posted: Fri Sep 05, 2008 7:42 am
by bokken
Hello to anyone who reads this and please forgive me I know nothing about php etc.

Currently I have this new site being developed, new web design company etc. We have this new format of Magento but it is only now that I am finding out how little my designer knows about php etc.
He has place a question on Magentos forum http://www.magentocommerce.com/boards/viewthread/16101/ which will give you a full idea as to what is going on so I am trying to help sort it out but I know less than he does :?

You will see from the link that I managed to get some help but I dont know what to do with it.

Does any one have any ideas. IF I have not included inforation that you need please let me know any advise would be great!

Re: Can anyone help? New site Big problems...........

Posted: Fri Sep 05, 2008 1:36 pm
by jaoudestudios
There are 2 images, and one is the one you want and the other is the one you have. The names of the files are not showing up but I am assuming you want the one on the left?

Do you want the swatches to be created on the fly from the database? Do you have the colours stored in the database (RGB, Hex...etc)?

Re: Can anyone help? New site Big problems...........

Posted: Fri Sep 05, 2008 2:22 pm
by bokken
yes sorry should have been more guided in my original question. Yes currently our site is on the right and we are after getting the colour images put in next to each colour name.

As a listing we have listed all the items as simple listings with main images and a colour sample image. We have then pulled to gether all the items into one listing under the grouped listing option so it is a case of pulling the colour sampl/photo from each listing to show up next to each title/item name down the right hand side of the page so that our customers have it idiot proof. title and colour there in one place.

have i now confused matters!!!! :(

Re: Can anyone help? New site Big problems...........

Posted: Fri Sep 05, 2008 2:44 pm
by jaoudestudios
A little bit :? :)

Do you have the colour swatches and just want to link them to the product? Or do you want the code to create the swatches on the fly?

Re: Can anyone help? New site Big problems...........

Posted: Fri Sep 05, 2008 3:09 pm
by bokken
As you can tell I have very limited knowledge with programming etc etc and that is why I thought I was paying my web guy but he is not much better......YEY :(

Currently our site is
http://79.170.40.182/cosmeticsfairy.co. ... index.php/
you can actually see the listings we have. basically what you will see is the limits of our current web guy as he does not know how to sort out the header etc etc . Any way going off the point....If you look at a few of the listings under eyeliner as we have not combined them yet you will see how the listings appear as a magento simple listing (sorry do not know how much you know about magento) we will be adding additional photo to each to provide to colour sample of that particular item. Then these simple listings get pulled together as a grouped listing which is like
http://79.170.40.182/cosmeticsfairy.co. ... nge-1.html ( hense where the title names in the list of the grouped item on the right comes from)

so information that you put into simple listings should be able to pull together to a grouped one.

Confused it even more now havent I........ :|

Re: Can anyone help? New site Big problems...........

Posted: Fri Sep 05, 2008 3:49 pm
by jaoudestudios
ok...actually a little less confused now, I think... :)

Sorry I dont know much about magento, or any other bought/open-source template system, I always custom build all my web services to suit my clients (from shopping carts, full content management systems, time management systems to community sites). But I might be able to give you some ideas.

Let me just check I understand correctly. So you have the grouped products appearing on the page together (i.e. all the nail polish) but you want the relevant colour swatches to appear next to them?

Re: Can anyone help? New site Big problems...........

Posted: Fri Sep 05, 2008 4:11 pm
by bokken
dont I tell you I wish we had gone to some one like you 3 companies ago! Been a bad year!!!!
Any way yes basically magento you have several product listing options. Standard listing (simple) just one product format. Then when you have several of the same items like we have different colour nail polishes. you have to list all your individual colours as a simple listing. For instance:
We have 9 colours in a range so we will have 9 simple listings (well 10 as we have the buy all colours option) so then you then do another listing but as a grouped item and then you then add all your simple listings to this. it will then list them all as you see in the example I showed you.

But we want the colour from each of those single listings to go next to the colour option (title from each single listing)
just like
http://www.charm.ro/catalog/product/vie ... tegory/53/

if you look at the side you can see all the colour options tha they have well in the admin area each colour option will be a simple listing where information is taken from.

I contacted the web guy for them and he told me
Quote:
That one was tricky for me too Here’s what you need to do.
First, when creating the simple products under main image add the image of the color you want to display.
Then, after adding the simple products to the group product, go to your templates folder, and edit /catalog/product/view/type/grouped.phtml
You will need to add an image on each row, next to each product. The url for the image can be computed like this:


$url = trim(Mage::getModel('core/url')->setType('media')->getHostUrl(),'/');
$url .= Mage::app()->getStore()->getConfig('catalog/images/product_upload_url');
$url .= $_item->getStockItem()->getProduct()->getData('small_image');

But this has me lost and I cannot find anyone one magento forum that can tell me what this means!

Does this help
Thank you by the way for your time :)

Re: Can anyone help? New site Big problems...........

Posted: Fri Sep 05, 2008 5:27 pm
by jaoudestudios
Unfortunately, there is only a very limited amount of information I can give you about that piece of code as most of it is referring to methods within a class (library), that has been written for and used by magento.

I am afraid to say it as I would have liked to be more helpful, but you need someone who has experience in magento.
First, when creating the simple products under main image add the image of the color you want to display.
Have you done this bit? (above)

From the instructions I understand you need to add the piece of code he has supplied in this file /catalog/product/view/type/grouped.phtml within the template folder, which will be the url for the image. Therefore, the url for the image is the source, so I assume you would need to add html image tags too for it to display to the browser.
i.e.

Code: Select all

 
$url = trim(Mage::getModel('core/url')->setType('media')->getHostUrl(),'/');
$url .= Mage::app()->getStore()->getConfig('catalog/images/product_upload_url');
$url .= $_item->getStockItem()->getProduct()->getData('small_image'); 
$swatch = "<img src='".$url."' alt='colour'/>";
 
Hope this helps