Jump to content

Remove color picker in v1.5


Recommended Posts

  • 2 weeks later...

This same thing happened to me.

I just compared my theme's product.tpl file to the new 1.5 default theme's product.tpl file and noticed that the color picker seems to be commented out in the new version. I copied that over to my products.tpl and that got rid of it. Here's what it looks like in my file now:

 

 {*{if isset($colors) && $colors}
 <!-- colors -->
 <div id="color_picker">
  <p>{l s='Pick a color:' js=1}</p>
  <div class="clear"></div>
  <ul id="color_to_pick_list" class="clearfix">
  {foreach from=$colors key='id_attribute' item='color'}
   <li><a id="color_{$id_attribute|intval}" class="color_pick" style="background: {$color.value};" onclick="updateColorSelect({$id_attribute|intval});$('#wrapResetImages').show('slow');" title="{$color.name}">{if file_exists($col_img_dir|cat:$id_attribute|cat:'.jpg')}<img src="{$img_col_dir}{$id_attribute}.jpg" alt="{$color.name}" width="20" height="20" />{/if}</a></li>
  {/foreach}
  </ul>
  <div class="clear"></div>
 </div>
 {/if}*}

  • Like 1
Link to comment
Share on other sites

My apologies for not posting this information sooner, but after talking with PaulJW, he brought it to my attention that it is a template incompatibility for those of us who chose to still use the old template rather than the new template supplied with the 1.5.x version. I hope this information helps others as well.

  • Like 1
Link to comment
Share on other sites

I repaired it by changing the line

if ((isset($row['attribute_color']) && $row['attribute_color']) || (file_exists(PS_COL_IMG_DIR.$row['id_attribute'].'.jpg')))
in the Productcontroller into
if ((isset($row['is_color_group']) && $row['is_color_group']) || (file_exists(PS_COL_IMG_DIR.$row['id_attribute'].'.jpg')))

 

PS: in the newer versions of PS (I tested 1.5.5) this becomes:

 

if ((isset($row['is_color_group']) && $row['is_color_group']) || (file_exists(_PS_COL_IMG_DIR_.$row['id_attribute'].'.jpg')))
Edited by musicmaster (see edit history)
  • Like 6
Link to comment
Share on other sites

  • 4 weeks later...

I repaired it by changing the line

if ((isset($row['attribute_color']) && $row['attribute_color']) || (file_exists(PS_COL_IMG_DIR.$row['id_attribute'].'.jpg')))

in the Productcontroller into

if ((isset($row['is_color_group']) && $row['is_color_group']) || (file_exists(PS_COL_IMG_DIR.$row['id_attribute'].'.jpg')))

 

Thank you musicmaster!!!

Link to comment
Share on other sites

  • 4 months later...

I tried to implement this fix and I get the following errors:

 

Notice: Use of undefined constant PS_COL_IMG_DIR - assumed 'PS_COL_IMG_DIR' in /home/bscdevel/public_html/wirerackdemo/shop/controllers/front/ProductController.php on line 390

Link to comment
Share on other sites

  • 2 months later...
  • 4 weeks later...

I repaired it by changing the line

if ((isset($row['attribute_color']) && $row['attribute_color']) || (file_exists(PS_COL_IMG_DIR.$row['id_attribute'].'.jpg')))

in the Productcontroller into

if ((isset($row['is_color_group']) && $row['is_color_group']) || (file_exists(PS_COL_IMG_DIR.$row['id_attribute'].'.jpg')))

 

Thank you musicmaster!! That worked perfectly!

Link to comment
Share on other sites

  • 1 month later...
  • 4 months later...

In Prestashop 1.4, on the product page, are displayed :
- a dropdown box
- and a color picker

Unfortunately in Prestahsop 1.5, is only displayed either drop down selection or color picker selection, but not both simultaneously.

Does anyone know how to keep display both ?

Thank you in advance for any reply.

Patrick

Link to comment
Share on other sites

×
×
  • Create New...