Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product Attributes


karenkitten

Recommended Posts

Is it possible within the product attributes/options/values to include an option that is sourced from an <img> tag as opposed to a <form> based tag, ie. select, radio, etc.

 

I have a product that has, for example 23 different colours of fabric. At the moment, I am including a table within the product description of a 60 X 60 image for each colour available.

 

To save the need to show the colours as a image and then also include a select box detailing the appropriate options available, I would like the consumer to be able to click on the applicable image and then utilise the "add to cart" button and put the product in the shopping basket.

Link to comment
Share on other sites

Matt

 

Thank for this. Managed to configure the admin side of this contribution. However, I am having a bit of difficulty in configuring the catalogue side.

 

The latter part of the instructions refer to adding lines of code in a particular section of product_info.php.

 

 

Add 2 further lines at around lines 165 and 170 as demonstrated in the following code by the "//Options as Images" comments:-

 

 

<td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>

<td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>

</tr>

<?php

}

?>

</table>

<?php

 

}

 

Coding to be added

//Options as Images. Add the curly bracket as shown on the next line

}

?>

 

<?php

//Options as Images. This whole php clause needs to be added

if (OPTIONS_AS_IMAGES_ENABLED == 'true') include ('options_images.php');

?>

 

)

 

 

Unfortunately the coding held within the located underneath the table tags does not match exactly with the contents of my file and as such when this coding is attached I get a parse error. "An unexpected < or $ found on line 181"

 

coding within my product_info.php

 

<tr>

<td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>

<td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute) . $products_options_name['products_options_comment']; ?></td>

</tr>

<?php

} //clr 030714 end switch

} //clr 030714 end while

?>

</table>

<?php

} //clr 030714 end if

?>

 

Hope the above is clear enough.

 

Apologies if this is a simple solution, but only being newbie to php, I am a bit daunted by this, any assistance would be greatly appreciated.

Link to comment
Share on other sites

Managed to get the catalog side to work without the code falling down. However when 'use images for product options' is set to true, not images are shown despite images being uploaded.

 

Can anyone shed any light on this?

 

Many thanks.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...