Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Possible to hide attributes on product info but still have them?


richard101000

Recommended Posts

Hi, do you know if its possible to hide the attributes on the product info page but yet still have them attached to products? When I delete the attribute code or part of it from the product info page and add the product to the cart it says product has been successfully added but yet hasn't. Many thanks!

The reason for this mod is that I've got a search page to search attributes, all my products only have a single attribute and it doesn't look good with my product attributes so I'd still like for the attributes to be searched but yet not displayed on product info page.

Link to comment
Share on other sites

Yes, it is possible. You shouldn't remove all of the attributes code, only the part that displays the attributes. But it seems you are going at it backwards. Why not just remove the attributes from the products and include whatever it would have been as part of the products description? Doing it your way, should you ever need just one product to display an attribute, you will be in a bind.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Thanks for the reply, I realise that I'll be in a bind, I do need an attribute to show that isn't part of the search idea but am doing this for a friend and they insist on a page with 4 drop down menus and to select sizes in each, the only way I personally can do this is through attribute search and as such am in this situation. I'll take another look at the product info code thanks

Link to comment
Share on other sites

The code below is the code I've been removing but when I do it says the item has been added to the cart but yet hasn't, am I looking at the wrong bit of code?

<?php echo $products_options_name['products_options_name'] . ':'; ?></strong><br /><?php echo tep_draw_pull_down_menu('id[' . $products_options_name

['products_options_id'] . ']', $products_options_array, $selected_attribute, 'style="width: 200px;"'); ?><br />

 

Link to comment
Share on other sites

Part of the code you are removing contains the id of the attribute so you need to add a hidden field so the code knows to add it. It would be something like

tep_draw_hidden_field('id[' . $products_options_name['products_options_id'] . ']', 0);

 

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

That still produced the same problem, I also tried the code below which produced the same problem, I'll be honest I don't really know what am doing, I've winged most of it so far!

<?php echo tep_draw_hidden_field('id[' . $products_options_name['products_options_id'] . $selected_attribute['products_id']['attributes']

['products_options_id'] .']', 0); ?>

 

Link to comment
Share on other sites

I haven't test that myself but as long as you have removed only the display code and placed that line in the same location, I don't see why it won't work. I am assuming there is only one attribute in the list since that is what you mentioned originally. If there are others, or just a select option entry, then you will have to change that code so it uses the correct ID.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...