Skip to content

Instantly share code, notes, and snippets.

@amacgregor
Created June 8, 2011 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amacgregor/1014491 to your computer and use it in GitHub Desktop.
Save amacgregor/1014491 to your computer and use it in GitHub Desktop.
spconfig
<script type="text/javascript">
var spConfig = new Product.Config({"attributes":{"149":{"id":"149","code":"test_attribute","label":"Configurable Option","options":[{"id":"3","label":"Option 1","oldPrice":"0","products":["6"]},{"id":"4","label":"Option 2","oldPrice":"0","products":["7"]}]}},"template":"$#{price}","basePrice":"50","oldPrice":"50","productId":"8","chooseText":"Choose an Option...","taxConfig":{"includeTax":false,"showIncludeTax":false,"showBothPrices":false,"defaultTax":0,"currentTax":0,"inclTaxTitle":"Incl. Tax"},"childProducts":{"7":{"price":"150","finalPrice":"150","productName":"Test Configurable Product (simple2)","description":"Test Configurable Product (simple2)","shortDescription":"Test Configurable Product (simple2)","productAttributes":"\n<div class=\"box-collateral-inner box-additional-inner\">\n <h2>Tabs<\/h2>\n <tbody>\n <tr>\n <div id=\"tabs\">\n <ul>\n \n <li>\n <a href=\"#tabs-tab_description\">Description<\/a>\n <\/li>\n \n <li>\n <a href=\"#tabs-tab_features\">Features<\/a>\n <\/li>\n \n <li>\n <a href=\"#tabs-tab_specs\">Specs<\/a>\n <\/li>\n \n <li>\n <a href=\"#tabs-tab_media\">Media<\/a>\n <\/li>\n \n <li>\n <a href=\"#tabs-tab_software\">Software<\/a>\n <\/li>\n \n <li>\n <a href=\"#tabs-tab_warranty\">Warranty<\/a>\n <\/li>\n \n <li>\n <a href=\"#tabs-tab_system_requirements\">Sys. Req.<\/a>\n <\/li>\n <\/ul>\n <div id=\"tabs-tab_description\">\n No \n\n <\/div>\n \n <div id=\"tabs-tab_features\">\n No \n\n <\/div>\n \n <div id=\"tabs-tab_specs\">\n No \n\n <\/div>\n \n <div id=\"tabs-tab_media\">\n <h1 style=\"margin-top: 15px; float: left; width: 700px;\">OtherMedia<\/h1> No \n\n <\/div>\n \n <div id=\"tabs-tab_software\">\n No \n\n <\/div>\n \n <div id=\"tabs-tab_warranty\">\n No \n\n <\/div>\n \n <div id=\"tabs-tab_system_requirements\">\n No \n\n <\/div>\n \n <\/div>\n <\/tr>\n <\/tbody>\n <\/table>\n <script type=\"text\/javascript\">decorateTable('product-attribute-specs-table')<\/script>\n<\/div>\n<div class=\"packageContents\">\n <div class=\"packageHeader\"><h1>Package Contents<\/h1><\/div>\n <div class=\"packageInside\">\n <h1 class=\"packTitle\">Test Configurable Product (simple2) <\/h1>\n<p><img src=\"http:\/\/staging.uniquesquared.com\/media\/catalog\/product\/cache\/1\/small_image\/135x\/9df78eab33525d08d6e5fb8d27136e95\/images\/catalog\/product\/placeholder\/small_image.jpg\" width=\"120\" height=\"110\" alt=\"\" \/><\/p>\n <ul class=\"packageList\">\n \n <li>\n <\/li>\n <\/ul>\n <\/div>\n <\/div>\n<script type=\"text\/javascript\">\n jQuery.noConflict();\n jQuery(\"#tabs\").tabs();\n<\/script>\n\n\n"},"6":{"price":"50","finalPrice":"50","productName":"Test Configurable Product (simple1)","description":"Test Configurable Product (simple1)","shortDescription":"Test Configurable Product (simple1)","productAttributes":"\n<div class=\"box-collateral-inner box-additional-inner\">\n <h2>Tabs<\/h2>\n <tbody>\n <tr>\n <div id=\"tabs\">\n <ul>\n \n <li>\n <a href=\"#tabs-tab_description\">Description<\/a>\n <\/li>\n \n <li>\n <a href=\"#tabs-tab_features\">Features<\/a>\n <\/li>\n \n <li>\n <a href=\"#tabs-tab_specs\">Specs<\/a>\n <\/li>\n \n <li>\n <a href=\"#tabs-tab_media\">Media<\/a>\n <\/li>\n \n <li>\n <a href=\"#tabs-tab_software\">Software<\/a>\n <\/li>\n \n <li>\n <a href=\"#tabs-tab_warranty\">Warranty<\/a>\n <\/li>\n \n <li>\n <a href=\"#tabs-tab_system_requirements\">Sys. Req.<\/a>\n <\/li>\n <\/ul>\n <div id=\"tabs-tab_description\">\n No \n\n <\/div>\n \n <div id=\"tabs-tab_features\">\n No \n\n <\/div>\n \n <div id=\"tabs-tab_specs\">\n No \n\n <\/div>\n \n <div id=\"tabs-tab_media\">\n <h1 style=\"margin-top: 15px; float: left; width: 700px;\">OtherMedia<\/h1> No \n\n <\/div>\n \n <div id=\"tabs-tab_software\">\n No \n\n <\/div>\n \n <div id=\"tabs-tab_warranty\">\n No \n\n <\/div>\n \n <div id=\"tabs-tab_system_requirements\">\n No \n\n <\/div>\n \n <\/div>\n <\/tr>\n <\/tbody>\n <\/table>\n <script type=\"text\/javascript\">decorateTable('product-attribute-specs-table')<\/script>\n<\/div>\n<div class=\"packageContents\">\n <div class=\"packageHeader\"><h1>Package Contents<\/h1><\/div>\n <div class=\"packageInside\">\n <h1 class=\"packTitle\">Test Configurable Product (simple1) <\/h1>\n<p><img src=\"http:\/\/staging.uniquesquared.com\/media\/catalog\/product\/cache\/1\/small_image\/135x\/9df78eab33525d08d6e5fb8d27136e95\/images\/catalog\/product\/placeholder\/small_image.jpg\" width=\"120\" height=\"110\" alt=\"\" \/><\/p>\n <ul class=\"packageList\">\n \n <li>\n <\/li>\n <\/ul>\n <\/div>\n <\/div>\n<script type=\"text\/javascript\">\n jQuery.noConflict();\n jQuery(\"#tabs\").tabs();\n<\/script>\n\n\n"}},"priceFromLabel":"Price From:","ajaxBaseUrl":"http:\/\/staging.uniquesquared.com\/index.php\/oi\/ajax\/","productName":"Configurable Test","description":"Configurable Test","shortDescription":"Configurable Test","imageUrl":"http:\/\/staging.uniquesquared.com\/media\/catalog\/product\/cache\/1\/image\/9df78eab33525d08d6e5fb8d27136e95\/images\/catalog\/product\/placeholder\/image.jpg","productAttributes":"\n<div class=\"box-collateral-inner box-additional-inner\">\n <h2>Tabs<\/h2>\n <tbody>\n <tr>\n <div id=\"tabs\">\n <ul>\n \n <li>\n <a href=\"#tabs-tab_description\">Description<\/a>\n <\/li>\n \n <li>\n <a href=\"#tabs-tab_features\">Features<\/a>\n <\/li>\n \n <li>\n <a href=\"#tabs-tab_specs\">Specs<\/a>\n <\/li>\n \n <li>\n <a href=\"#tabs-tab_media\">Media<\/a>\n <\/li>\n \n <li>\n <a href=\"#tabs-tab_software\">Software<\/a>\n <\/li>\n \n <li>\n <a href=\"#tabs-tab_warranty\">Warranty<\/a>\n <\/li>\n \n <li>\n <a href=\"#tabs-tab_system_requirements\">Sys. Req.<\/a>\n <\/li>\n <\/ul>\n <div id=\"tabs-tab_description\">\n Configurable Test \n\n <\/div>\n \n <div id=\"tabs-tab_features\">\n Configurable Test \n\n <\/div>\n \n <div id=\"tabs-tab_specs\">\n Configurable Test \n\n <\/div>\n \n <div id=\"tabs-tab_media\">\n <h1 style=\"margin-top: 15px; float: left; width: 700px;\">OtherMedia<\/h1> Configurable Test \n\n <\/div>\n \n <div id=\"tabs-tab_software\">\n Configurable Test \n\n <\/div>\n \n <div id=\"tabs-tab_warranty\">\n Configurable Test \n\n <\/div>\n \n <div id=\"tabs-tab_system_requirements\">\n Configurable Test \n\n <\/div>\n \n <\/div>\n <\/tr>\n <\/tbody>\n <\/table>\n <script type=\"text\/javascript\">decorateTable('product-attribute-specs-table')<\/script>\n<\/div>\n<div class=\"packageContents\">\n <div class=\"packageHeader\"><h1>Package Contents<\/h1><\/div>\n <div class=\"packageInside\">\n <h1 class=\"packTitle\">Configurable Test <\/h1>\n<p><img src=\"http:\/\/staging.uniquesquared.com\/media\/catalog\/product\/cache\/1\/small_image\/135x\/9df78eab33525d08d6e5fb8d27136e95\/images\/catalog\/product\/placeholder\/small_image.jpg\" width=\"120\" height=\"110\" alt=\"\" \/><\/p>\n <ul class=\"packageList\">\n \n <li>\n <\/li>\n <\/ul>\n <\/div>\n <\/div>\n<script type=\"text\/javascript\">\n jQuery.noConflict();\n jQuery(\"#tabs\").tabs();\n<\/script>\n\n\n","imageZoomer":"<p class=\"product-image\">\n <img src=\"http:\/\/staging.uniquesquared.com\/media\/catalog\/product\/cache\/1\/image\/265x\/9df78eab33525d08d6e5fb8d27136e95\/images\/catalog\/product\/placeholder\/image.jpg\" alt=\"Configurable Test\" title=\"Configurable Test\" \/><\/p>\n","showPriceRangesInOptions":true,"rangeToLabel":"to"});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment