Jump to content

How to add attributes to category page


Guest

Recommended Posts

Hi Again

Hope you are all enjoying life :)

I have a problem that I hope someone can help me with!!!

I have 7 Categories with a few products in each Categorie.
They are listet (the products of that category) beneath each other in the center of the page when I press/choose one of the categories

From there I can choose to put one of the products in the cart or to view it!

And here comes my problem - I have added arround 25 different variations in some of the products - But it´s not possible to choose the size/variation/Attribute from this page - That can only happen from the view the product page!!!

Is there some way arround this - Is it possible to insert a script that ask you to choose your size before adding to the cart?? Or perhaps another solution?


Best wishes from Sif

Link to comment
Share on other sites

Hey Guys and Girls

I´ve enclosed some pics - For a better explanation...

How can I add attributes to the products when they are viewd from the categories also

Please someone help me out here...

1538_8zSVoFcmV6quPph8s3W0_t

1539_7ZyegKDDHSVIhk4G1fXK_t

Link to comment
Share on other sites

Hello sifneo,
I have the same problem and have been looking for the same feature and conclude that a modification needs to be done to product-list.tpl but I don't know how to program so I'm stuck on this one.
The feature is available in agora cart and viart but that is not a solution for Prestashop :blank:

By the way, it is good forum etiquette to only post one thread per topic to avoid confusion

Link to comment
Share on other sites

Thank you for your correction jtyana + moderator!!!
I got a bit stressed out - Sorry for that one.

I really need a solution for this issue ASAP.
I ´ve been working non stop for 2 weeks and I´m nearly done - That was until I found this problem :(

I would be very unhappy if Prestashop is not the right solution for me, cos I think it´s fantastic - But I´m stuck.

Sif

Link to comment
Share on other sites

I really need attributes on the categories product-list.tpl too
I've been looking for a cart solution for 9 months. All I need in Prestashop is the ability to select attributes on the categories page and ability to have a quantity field
Alas, I'm going to have to go elsewhere :down:

If any moderators are present, would you please confirm that this feature is not available and not likely to be available in the near future please
I don't want to go elsewhere. Prestashop is excellent but I need attirbutes and qty on the products-list.tpl

Thank-you

Link to comment
Share on other sites

Hey Again

Is there anyone out there who can help out here?

Is this possible or not? I am not a hard core programmer so I really dont know if it´s possible to make it happen or not!

Please get back to me/us ASAP

My shop has to get online next week and I need the right solution -

Best wishes
Sif

Link to comment
Share on other sites

Hi,

Currently, you can only choose your attributes using the product page.
Of course we could have done it everywhere, but it wasn't the way we saw it. The product lists are only shortcut, and when you choose a product with attribute in there, it is added with the default attributes.

You can try to copy/paste a part of the product page (.php as well as .tpl, or if you want to be smart copy it into some module but that's even worse), but it won't be that easy.

I'm sorry.
The only way without changing anything in the template is to duplicate your product, but that's for this case that the attributes have been create so it's too bad...

Link to comment
Share on other sites

Thanks for your response Damien. At least I now know I can't use Prestahsop :down: and we haven't even got a crying smiley :(

For more expensive items like clothes, digital cameras, plasma TVs, toys, where the shopper is only likely to buy a few products per order, the way Prestashop's category page doesn't show attriubutes is fine

But for shops that sell multiple items eg groceries, it is too inconvenient for the shopper to keep going into the product page to select the attribute
Some shops/stores have orders with over 10 items on it or more. It would take a long time for the shopper to keep going in and out of the category and product pages to select the product and attributes to add to cart.

I had a look at the product and product-lists.tpl files and the change requires someone with a knowledge of programming

Thanks for responding anyway. I will go away and cry now :down:
Maybe another version :coolsmile:

Link to comment
Share on other sites

Hey

I also want to thank you Damien for your respons... I must admit that I am very sad too.
But I dont want to give up... I think PrestaShop is fantastic - And I really want to contribute in any way I can :) So Jityana hang in there - We will get this problem sorted out :)

What kind of programmer is needed to change the product and product-lists.tpl ?
and how long would it approx take?

I know that Prestashop is all about sharing - And if somebody out there feels like helping out here - It would be fantastic...

If not then I will try to hire someone to do the programming (if it´s not a massive job)

Love Respect and positive vibrations from Sif

Link to comment
Share on other sites

Hi sifneo,
There is a moderator on here by the username of amwdesigns
If you are willing to pay, you could try and send him a PM. He might take on the work
Don't tell him I said so :coolsmile:

As for me, I have spent my money on a license for another cart program
I can't wait for Prestashop. I have to go live this weekend

Link to comment
Share on other sites

Hi Alpha Media - Wow thats really good news :)

Thank you so much for your interest.

And Jtyana sorry to see you go but I wish you the best of luck with your shop ...

Best wishes from
Sif

Link to comment
Share on other sites

Hi AMWDesign. I am interested in this too. Are you working on it? I would be willing to make a donation to be able to use it. Thank you. :);)

only just seen this thread :-P
should be straight forward enough PM & I will see what I can do ;-)
Link to comment
Share on other sites

  • 2 weeks later...

Here is an update on the current situation with product attributes
Please do not use the below as this is not a solution, this is just there for testing purposes.!


You can try to copy/paste a part of the product page (.php as well as .tpl, or if you want to be smart copy it into some module but that’s even worse), but it won’t be that easy.


Copy & pasting area's of the code does not seem to work in this case because the current methods in product.php is using $_GET['id_product'];
And the Category page obviously does not display this, so I thought it would be better to create a module that way we can use it anywhere.

For example I have created a new hook in the DB called hookAttributes & setup a module to display attributes for each product, the problem is there seems to be no way to define the product_id to fetch the corresponding attributes :question:

using this as an example of the problem, here is where the new hook is called in product_list.tpl

{foreach from=$products item=product name=products}



{if $product.new == 1}{l s='new'}{/if}{$product.name|truncate:35|escape:'htmlall':'UTF-8'}
{$HOOK_ATTRIBUTES}



Now the issue is there is no way to define within the new attributes module the current Product ID this is because although I have now added the hook to display for each product I can't seem to work out a way to call the current rows product ID ???

If I can work out a way to fetch the current products row ID I will be able to finish this module.
Unfortuntly at the moment I can' think of a solution :(

Now I know this needs to be done A.S.A.P. so I hope other developers can take a quick look & suggest a variable to use below replacing "5" which is only displayed as a test, currently this displays on every row.

I would be half way there if this displayed the actual Product ID :lol:

 function hookAttributes($params)
{
global $smarty;

$id_product = "5";

$row = Db::getInstance()->getRow('
SELECT id_product
FROM `'._DB_PREFIX_.'product`
WHERE `id_product` = "'.intval($id_product).'"');

$this->id = intval($row['id_product']);

Link to comment
Share on other sites

×
×
  • Create New...