Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need Help Identifying Duplicate Code


wrequine

Recommended Posts

Posted

I posted this in the Options Types V2 Support thread, but that thread appears to be dead and since I am not a coder, I am stumped.

 

I have a purchased template and have Option Types V2 installed and working beautifully, but the appearance is wrong. Any Option Type options are duplicated with the regular options. You can see an example of this problem here (see the bottom three options).

 

I was pretty sure the problem was in product_info.php, but have been unable to identify any duplicate code. In viewing the source code I have narrowed down to the section of the code with the duplication, and now believe the problem may have something to do with the template. I have been through all the template files and cannot find what I am looking for. Can or will anyone take a look at this and give me an idea of where this duplicate code might be?

 

Here is the section of source code with the duplications:

 

 <td class="main"><select name="id[27]" onChange="document.getElementById('ImageSelect27').innerHTML=ImageText27[this.selectedIndex];"><option value="265">Hancock</option><option value="266">CocaCola</option><option value="267">Script</option><option value="268">Curlz</option><option value="269">Arial</option><option value="270">Chancery</option></select> </td>
  </tr>
  <tr>
	<td width="100%" class="main" colspan="2">
	 <center><div class="main" id="ImageSelect27"><img src="images/options/Option_Hancock.jpg" alt="Hancock" title="Hancock"></div></center>
	</td>
  </tr>
			  <tr>
		  <td class="az_product_info_text">Font Style:</td>
		  <td class="az_product_info_text"><select name="id[27]"><option value="265">Hancock</option><option value="266">CocaCola</option><option value="267">Script</option><option value="268">Curlz</option><option value="269">Arial</option><option value="270">Chancery</option></select>   </td>
		</tr>	  <tr>
  <td class="main">Personalize Side 1 :</td>
  <td class="main"><input type="text" name="id[txt_54]" id="id[txt_54]" size="15" maxlength="15"
						 value=""></td>
  </tr>			 <tr>
		  <td class="az_product_info_text">Personalize Side 1:</td>
		  <td class="az_product_info_text"><select name="id[54]"><option value="0" SELECTED>CUSTOMER-INPUT</option></select>   </td>
		</tr>	  <tr>
  <td class="main">Personalize Side 2 :</td>
  <td class="main"><input type="text" name="id[txt_56]" id="id[txt_56]" size="15" maxlength="15"
						 value=""></td>
  </tr>			 <tr>
		  <td class="az_product_info_text">Personalize Side 2:</td>
		  <td class="az_product_info_text"><select name="id[56]"><option value="0" SELECTED>CUSTOMER-INPUT</option></select>   </td>
		</tr>		  </table>

Posted

Your duplication is in the code, change from this:

 

<tr>
<td class="main">Personalize Side 1 :</td>
<td class="main"><input type="text" name="id[txt_54]" id="id[txt_54]" size="15" maxlength="15" value=""></td>
</tr>
<tr>
<td class="az_product_info_text">Personalize Side 1:</td>
<td class="az_product_info_text"><select name="id[54]"><option value="0" SELECTED>CUSTOMER-INPUT</option></select>   </td>
</tr>	
<tr>
<td class="main">Personalize Side 2 :</td>
<td class="main"><input type="text" name="id[txt_56]" id="id[txt_56]" size="15" maxlength="15" value=""></td>
</tr>
<tr>
<td class="az_product_info_text">Personalize Side 2:</td>
<td class="az_product_info_text"><select name="id[56]"><option value="0" SELECTED>CUSTOMER-INPUT</option></select>   </td>
</tr>

 

To this:

 

<tr>
 <td class="main">Personalize Side 1 :</td>
 <td class="main"><input type="text" name="id[txt_54]" id="id[txt_54]" size="15" maxlength="15" value=""></td>
</tr>
<tr>
 <td class="main">Personalize Side 2 :</td>
 <td class="main"><input type="text" name="id[txt_56]" id="id[txt_56]" size="15" maxlength="15" value=""></td>
</tr>

 

Hope this helps!

 

Peace,

Chris

Archived

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

×
×
  • Create New...