Sub-product template being overwritten by the "parent&q
Posted: Sun Jan 09, 2005 10:46 am
I have a custom product template called AC_Container whose sole existance is
to "contain" and display related products. It just displays sub-products in
a table.
Sort of a way to categorize products. See
http://www.ahoycaptain.com/shop/bruce_rollers.html for the example. What
you're seeing here is the More Information Page of the product generated
with the AC_Container template.
The products displayed in the table are sub-products to the main "container"
product. They are seperate products generated using another custom
template - AC_Product. This template is used thoughout the website
succesfully and is our default template for 90% of our products.
Now here's the kicker. When I added More Information Pages to these
sub-products and modified the AC_Container template to display the
sub-product URL (see code below) something very strange occurs.
[-- DEFINE SUBPRODUCT --]
.....
.....
.....
<td align="left" width="350"><font size="2">
[-- IF PRODUCT.DisplayName --]
[-- IF PRODUCT.DisplayMoreInformationPage--]
<a href="[-- PRODUCT.MoreInfoURL --]">[-- PRODUCT.Name --]</a>
[-- ELSE --]
<b>[-- PRODUCT.Name --]</b>
[-- END_IF --]
[-- END_IF --]
</font></td>
....
....
[-- END_DEFINE SUBPRODUCT --]
Look at the table Header row of the container product. It looks like this:
Product SKU Captain's Price Options Qty
This is generated in the [-- DEFINE MORE_INFO_PAGE --] section of
AC_Container template.
Now click on the product name of one of the products in the table. This
links to the More Information page of the product generated with the
template AC_Product. Notice that there's nothing there for price sku or add
to cart etc.
But there is
Product SKU Captain's Price Options Qty
In trying to correct this so that the product displays Price etc. I found
that nothing was changing no matter what I did to the AC_Product template.
However, when I changed the title for Qty in the AC_Container to Qtyy. The
sub-products more information page WAS changed accordingly. Like this
(recreated for this post).
Product SKU Captain's Price Options Qtyy
It appears that the [-- DEFINE MORE_INFO_PAGE --] code of the AC_Container
gets substitued to format the more information page of the sub-product even
though the sub-product's template is AC_Product, has different code and has
already been generated and published.
Bottom line - how/why can a product affect the way a sub-products' more
information page displays?
I know this is circular logic and is hard to follow, (it makes my head hurt)
but it is what's happening.
to "contain" and display related products. It just displays sub-products in
a table.
Sort of a way to categorize products. See
http://www.ahoycaptain.com/shop/bruce_rollers.html for the example. What
you're seeing here is the More Information Page of the product generated
with the AC_Container template.
The products displayed in the table are sub-products to the main "container"
product. They are seperate products generated using another custom
template - AC_Product. This template is used thoughout the website
succesfully and is our default template for 90% of our products.
Now here's the kicker. When I added More Information Pages to these
sub-products and modified the AC_Container template to display the
sub-product URL (see code below) something very strange occurs.
[-- DEFINE SUBPRODUCT --]
.....
.....
.....
<td align="left" width="350"><font size="2">
[-- IF PRODUCT.DisplayName --]
[-- IF PRODUCT.DisplayMoreInformationPage--]
<a href="[-- PRODUCT.MoreInfoURL --]">[-- PRODUCT.Name --]</a>
[-- ELSE --]
<b>[-- PRODUCT.Name --]</b>
[-- END_IF --]
[-- END_IF --]
</font></td>
....
....
[-- END_DEFINE SUBPRODUCT --]
Look at the table Header row of the container product. It looks like this:
Product SKU Captain's Price Options Qty
This is generated in the [-- DEFINE MORE_INFO_PAGE --] section of
AC_Container template.
Now click on the product name of one of the products in the table. This
links to the More Information page of the product generated with the
template AC_Product. Notice that there's nothing there for price sku or add
to cart etc.
But there is
Product SKU Captain's Price Options Qty
In trying to correct this so that the product displays Price etc. I found
that nothing was changing no matter what I did to the AC_Product template.
However, when I changed the title for Qty in the AC_Container to Qtyy. The
sub-products more information page WAS changed accordingly. Like this
(recreated for this post).
Product SKU Captain's Price Options Qtyy
It appears that the [-- DEFINE MORE_INFO_PAGE --] code of the AC_Container
gets substitued to format the more information page of the sub-product even
though the sub-product's template is AC_Product, has different code and has
already been generated and published.
Bottom line - how/why can a product affect the way a sub-products' more
information page displays?
I know this is circular logic and is hard to follow, (it makes my head hurt)
but it is what's happening.