New Zenner
- Join Date:
- Jan 2007
- Posts:
- 86
- Plugin Contributions:
- 0
Formating using Data from Excel for Product Description (and maybe more)
I was reading https://www.zen-cart.com/tutorials/index.php?article=153 and http://www.zen-cart.com/forum/showthread.php?t=14096
Here is the top line of Excel (that pertains to description): DWT Stone shape A Qty stones A Size Stones A Stone shape B Qty stones B Size Stones B Stone shape C Qty stones C Size Stones C Stone shape D Qty stones D Size Stones D Stone shape E Qty stones E Size Stones E Stone shape F Qty stones F Size Stones F Stone shape G Qty stones G Size Stones G
Now what I want to do is take the data that corresponds to these fields such as:
0.7 RD 1 .09 RD 1 .05 RD 1 .04 RD 1 .03 RD 1 .02 RD 1 .015 RD 1 .01
And turn it into something that looks like this:
DWT Stone Size
1/4 0.7 1-.09, 1-.05, 1-.04, 1-.03, 1-.02, 1-.015, 1-.01
1/3 0.8 1-.10, 1-.08, 1-.06, 1-.04, 1-.02, 1-.01, 1-.005
1/2 0.9 1-.18, 1-.10, 1-.08, 1-.06, 1-.04, 1-.03, 1-.02
3/4 1.1 1-.20, 1-.18, 1-.15, 1-.10, 1-.06, 1-.04, 1-.03
1 1.2 1-.33, 1-.20, 1-.15, 1-.12, 1-.08, 1-.06, 1-.04
1 1/2 1.5 1-.50, 1-.33, 1-.23, 1-.18, 1-.12, 1-.09, 1-.06
2 2.0 1-.60, 1-.40, 1-.30, 1-.25, 1-.20, 1-.15, 1-.10
2 1/2 2.2 1-.80, 1-.55, 1-.40, 1-.30, 1-.20, 1-.15, 1-.10
3 2.4 1-.90 , 1-.60, 1-.50, 1-.40, 1-.30, 1-.20, 1-.10
(example here: http://jeffdavidcasting.com/catalog/index.php?main_page=product_info&cPath=37&products_id=1)
[This was achieved using a table formatting
<div class="information_table">
<table border="0" cellpadding="0" cellspacing="15" class="product_table">
<tr class="header_line">
<td colspan="2" align="right" class="DWT_header">DWT</td>
<td class="stone_information_header">Stone Size</td>
</tr>
<tr>
<td class="total_weight">
<b>1/4</b>
</td>
<td class="dwt">
0.7
</td>
<td class="stone_information">1-.09, 1-.05, 1-.04, 1-.03, 1-.02, 1-.015, 1-.01
</td>
</tr>
<tr>
<td class="total_weight">
<b>1/3</b>
</td>
<td class="dwt">
0.8
</td>
<td class="stone_information">
1-.10, 1-.08, 1-.06, 1-.04, 1-.02, 1-.01, 1-.005
</td>
</tr>
<tr>
<td class="total_weight">
<b>1/2</b>
</td>
<td class="dwt">0.9</td>
<td class="stone_information">
1-.18, 1-.10, 1-.08, 1-.06, 1-.04, 1-.03, 1-.02
</td>
</tr>
<tr>
<td class="total_weight">
<b>3/4</b>
</td>
<td class="dwt">
1.1
</td>
<td class="stone_information">
1-.20, 1-.18, 1-.15, 1-.10, 1-.06, 1-.04, 1-.03
</td>
</tr>
<tr>
<td class="total_weight">
<b>1</b>
</td>
<td class="dwt">
1.2
</td>
<td class="stone_information">
1-.33, 1-.20, 1-.15, 1-.12, 1-.08, 1-.06, 1-.04
</td>
</tr>
<tr>
<td class="total_weight">
<b>1 1/2</b>
</td>
<td class="dwt">
1.5
</td>
<td class="stone_information">
1-.50, 1-.33, 1-.23, 1-.18, 1-.12, 1-.09, 1-.06
</td>
</tr>
<tr>
<td class="total_weight">
<b>2</b>
</td>
<td class="dwt">
2.0
</td>
<td class="stone_information">
1-.60, 1-.40, 1-.30, 1-.25, 1-.20, 1-.15, 1-.10
</td>
</tr>
<tr>
<td class="total_weight">
<b>2 1/2</b>
</td>
<td class="dwt">
2.2
</td>
<td class="stone_information">
1-.80, R1-.55, 1-.40, 1-.30, 1-.20, 1-.15, 1-.10
</td>
</tr>
<tr>
<td class="total_weight">
<b>3</b>
</td>
<td class="dwt">
2.4
</td>
<td class="stone_information">
1-.90 , 1-.60, 1-.50, 1-.40, 1-.30, 1-.20, 1-.10
</td>
</tr>
<!--
<tr>
<td class="total_weight">
<b>3</b>
</td>
<td class="dwt">
2.4
</td>
<td class="stone_information">
1-.90 , 1-.60, 1-.50, 1-.40, 1-.30, 1-.20, 1-.10
</td>
</tr>
//-->
</table>
</div>
Now I have been looking into generators and populators, but Easy Populate does not seem to fit this.
But I have been looking into coding my own, but unsure how to start (and I am looking at the wiki).
Basically the first thing I want to do is copy the data from those Excel columns and have them formatted.
Now I am pretty sure that this can be done as I was reading about generators and importing from Excel.
Also I saw that osCommerce has an Excel importer http://www.oscommerce.com/community/contributions,485
Is there a way to auto-format this data?
Thank you and sorry if this sounds confusing.