Using Product Templates on Category Pages
Posted: Tue Jul 29, 2014 10:09 am
Hello Fellow Ablecommerce users ( and Able Team Members )
I am currently trying to build a custom Category Page conLib file. For it, I would like to use a product template that is attached to all of the products for that category and list the products in a table format with the table header cells being a repeater with the merchant field names in the product template and the body cells being a repeater on each table row with the input values for each field in the product template, as well as the price and add to cart links. I am really getting stumped on trying to come up with a way to identify if a particular merchant field in the product template is used by any products in the category, and if not, to not display it ( so that I dont have a table stretched out with columns that don't have any data in them ).
Has anybody else come up with a category display conlib that makes use of product templates? And if so, can you share how you made it work?
As a reference, here is two categories on my site that would benefit from the above conlib, http://store.scottsbt.com/Fishing/Reels ... alVSX.aspx and http://store.scottsbt.com/Fishing/Reels ... nning.aspx
In them are hard-coded tables that I have in the category description that has the models (products) and the information for those products. Underneath, is the control that actually displays the products. In those product pages, are tables that show the same model information, but the header rows are the tf.InputField.Name fields and the content underneath are the tf.InputValue fields from the product template used on those products.
I would like to move away from having a hard-coded table in the description that displays model information for products that we might not have anymore, and also has the repetition of having that table and then the products displayed underneath in the category page.
I included 2 categories because the products in those categories use the same product template, however, not all of the product template fields are used on both of them. In the product display pages, I have it set to check to see if the value of a field is null or empty, and to not display the field if so. However, I can't figure out how to do this on a category wide level.
Any help would be appreciated,
Ryan A.
I am currently trying to build a custom Category Page conLib file. For it, I would like to use a product template that is attached to all of the products for that category and list the products in a table format with the table header cells being a repeater with the merchant field names in the product template and the body cells being a repeater on each table row with the input values for each field in the product template, as well as the price and add to cart links. I am really getting stumped on trying to come up with a way to identify if a particular merchant field in the product template is used by any products in the category, and if not, to not display it ( so that I dont have a table stretched out with columns that don't have any data in them ).
Has anybody else come up with a category display conlib that makes use of product templates? And if so, can you share how you made it work?
As a reference, here is two categories on my site that would benefit from the above conlib, http://store.scottsbt.com/Fishing/Reels ... alVSX.aspx and http://store.scottsbt.com/Fishing/Reels ... nning.aspx
In them are hard-coded tables that I have in the category description that has the models (products) and the information for those products. Underneath, is the control that actually displays the products. In those product pages, are tables that show the same model information, but the header rows are the tf.InputField.Name fields and the content underneath are the tf.InputValue fields from the product template used on those products.
I would like to move away from having a hard-coded table in the description that displays model information for products that we might not have anymore, and also has the repetition of having that table and then the products displayed underneath in the category page.
I included 2 categories because the products in those categories use the same product template, however, not all of the product template fields are used on both of them. In the product display pages, I have it set to check to see if the value of a field is null or empty, and to not display the field if so. However, I can't figure out how to do this on a category wide level.
Any help would be appreciated,
Ryan A.