[Plugin: eShop] Edit product overview
-
Hi,
How i can edit the product template? I want to remove “additional options” from post body even they are active.
-
There isn’t a product template in eShop. What “additional options” are you referring to? Can you post a link to an example?
I want to remove what is inside the rectangle:
http://i49.tinypic.com/mirlx.jpgAre these options sets?
Yes, but i just want to remove that info from post body without unset this options.
Then you should be able to use CSS to hide the options – either by amending your theme’s CSS or your custom eshop.css file (see Appearance -> eShop). I suggest using Firefox with the Firebug add-on for this kind of CSS work.
http://getfirebug.com/Humm.. no way to hide it in php code?
No. sorry.
So, where is the php code?
Solution:
Go to eshop-shortcodes.php and remove this code:
case 'optionset': if(isset($eshop_product['optset'])){ $osets=$eshop_product['optset']; $thclass=''; $thprice=__('Price','eshop'); if(isset($eshop_product['sale']) && $eshop_product['sale']=='yes'){ $thprice=__('Sale Price','eshop'); $thclass=' class="sale"'; } if(is_array($osets)){ $listed.='<dt>'.__('Additional Options','eshop')."</dt>\n"; $listed.='<dd>'; $opttable=$wpdb->prefix.'eshop_option_names'; $optsettable=$wpdb->prefix.'eshop_option_sets'; foreach($osets as $optid){ $myrowres=$wpdb->get_results($wpdb->prepare("select name as optname, price,weight from $optsettable where optid='%d' ORDER by id ASC",$optid)); $egrab=$wpdb->get_row($wpdb->prepare("select * from $opttable where optid='%d' LIMIT 1",$optid)); if(isset($egrab->name)){ $ename=$egrab->name; $etype=$egrab->type; $edesc=$egrab->description; $checkrows=sizeof($myrowres); $i=1; $tbody=''; foreach($myrowres as $myrow){ if($myrow->weight=='') $myrow->weight='0'; $alt = ($i % 2) ? '' : ' class="alt"'; $tbody.="<tr".$alt.">\n". '<th id="'.$eshopletter.'eshopnumrow'.$i.'" headers="'.$eshopletter.'eshopnum">'.$i.'</th>'; if(!in_array('option',$willhide)) $tbody.='<td headers="'.$eshopletter.'eshopoption '.$eshopletter.'eshopnumrow'.$i.'">'.stripslashes(esc_attr($myrow->optname)).'</td>'; if(!in_array('price',$willhide)) $tbody.='<td headers="'.$eshopletter.'eshopprice '.$eshopletter.'eshopnumrow'.$i.'"'.$thclass.'>'.sprintf( __('%1$s%2$s','eshop'), $currsymbol, number_format_i18n($myrow->price,__('2','eshop'))).'</td>'; if($eshopoptions['shipping']=='4' && !in_array('weight',$willhide)){ /* ,'1- weight 2-weight symbol' */ $tbody.='<td headers="'.$eshopletter.'eshopweight '.$eshopletter.'eshopnumrow'.$i.'">'.sprintf( __('%1$s %2$s','eshop'), number_format_i18n($myrow->weight,__('2','eshop')),$weightsymbol).'</td>'; } $tbody.="</tr>\n"; $i++; } $listed.='<strong>'.stripslashes(esc_attr($ename)).'</strong><br />'; $listed.=nl2br(stripslashes(esc_attr($edesc))); $listed.='<table class="eshop" summary="'.__('Product Options by option and price','eshop').'"> <thead><tr> <th id="'.$eshopletter.'eshopnum">#</th>'; if(!in_array('option',$willhide)) $listed.='<th id="'.$eshopletter.'eshopoption">'.__('Option','eshop').'</th>'; if(!in_array('price',$willhide)){ $listed.='<th id="'.$eshopletter.'eshopprice"'.$thclass.'>'.$thprice.'</th>'; } if($eshopoptions['shipping']=='4' && !in_array('weight',$willhide)) $listed.='<th id="'.$eshopletter.'eshopweight">'. __('Weight','eshop').'</th>'; $listed.='</tr></thead><tbody>'."\n"; $listed.=$tbody; $listed.='</tbody></table>'."\n"; $eshopletter++; } } $listed.="</dd>\n"; } } break;Please be aware that, if you hack the plugin’s code, we can no longer offer you any support.
The topic ‘[Plugin: eShop] Edit product overview’ is closed to new replies.