Unhandled Error!

Undefined variable: config

Document /modules/stavepuzzles/classes/stavepuzzles_helper.php
Document type PHP document
Line 321
Exception class Phpr_PhpException

Code Highlight

	public static function init_config() {
		if (!self::$config) {
			$config = new StaveCustomizations_Configuration();
			self::$config = $config->load();
		}
 
		return $config;
	}
 
}
 
 
 
# Call Stack Code Document Line
17 StavePuzzles_Helper::init_config(()) /modules/stavepuzzles/classes/stavepuzzles_helper.php 286
16 StavePuzzles_Helper::get_in_stock_info(object(Shop_Product)) /modules/cms/classes/cms_controller.php(383) : eval()'d code 190
15 eval(()) /modules/cms/classes/cms_controller.php 383
14 Cms_Controller->evalWithException('?><script> setTimeout(function(){ // if (window.pid == 3904) { throwError(); } else { console.log("not PP"); } // }, 2000); </script> <? $trad_default = "Traditional puzzles start with the finest art available. " . "They are often crafted with an irregular edge that may vary depending on the size of the puzzle. " . "You may request names, dates, and special figure shapes (called silhouettes) " . "to be crafted into your puzzle. We will fill your Traditional puzzle with charming, " . "clever, and elegant silhouette pieces according to your wishes OR you can just let us " . "surprise you! The number of custom pieces depends on the <a href='/price-grid' class='fancybox.iframe price-grid'>size of the puzzle</a>. " . "The larger the puzzle, the more special pieces you can request. You'll also discover special cutting " . "features within the puzzle designed to surprise, confound, and delight you!"; $is_trad_default = "Need a puzzle now and don’t want to wait? InStock Traditional puzzles are " . "available for immediate delivery. They are pre-crafted with the same care and creativity as a " . "made to order puzzle and filled with charming, clever, and elegant silhouette pieces. They are " . "often crafted with an irregular edge that may vary depending on the size of the puzzle. You'll " . "also discover special cutting features within the puzzle designed to surprise, confound, and delight you!"; $posted_options = Shop_ProductHelper::get_default_options($product); $images = $product->om('images', $posted_options); $on_sale = $product->om('is_on_sale', $posted_options); $diff_info = StavePuzzles_Helper::get_difficulty_info($product); $diff_img_path = $diff_info['image']; $diff_text = $diff_info['sym'] . ": " . $diff_info['text']; // Backend_Controller::debug("foobar", "shop:product"); if ($product->get_attribute("dimensions")) { $dims = "Size: " . $product->get_attribute("dimensions"); } else if ($product->get_attribute('puzzle_type') == "Traditional") { $dims = "<a href='/price-grid' class='fancybox.iframe price-grid'>See Traditional Size/Price Grid</a>"; } else { $dims = ""; } if ($images->first) { $image = $images->first->thumb(746, 'auto'); $large_image = $images->first->thumb(1000, 'auto'); } else { $image = 'http://placehold.it/460x300'; $large_image = "#"; } $num_pieces = $product->get_attribute('pieces'); ?> <div class="twelve columns <?= $on_sale ? 'sale' : null ?>"> <h2><?= h($product->name) ?></h2> <!-- IMAGE WRAP --> <div class="product-image-wrapper"> <div class='product-social clearfix'> <a href="//pinterest.com/pin/create/button/" data-pin-do="buttonBookmark" > <img src="//assets.pinterest.com/images/pidgets/pin_it_button.png" /></a> <div class="fb-like" data-layout="button_count" data-show-faces="false" data-send="false"></div> </div> <div class="item-images"> <div class="product-details-large-image"> <a href='<?=$large_image?>' id='main_image_link' class='fancybox'><div class='product-details-mag'></div></a> <img id='main_image' src="<?= $image ?>" alt="Stave Puzzles: <?=h($product->name) ?>"/> </div> <? // ?> <? if ($images->count > 1): ?> <ul class="row alt-images"> <? foreach ($images as $image) : ?> <li class="four columns mobile-two"><a href="<?= $image->thumb(746, 'auto') ?>"><img src="<?= $image->thumb(367, 367)?>"/></a></li> <? endforeach ?> </ul> <? endif ?> </div> <!-- other stuff under image...--> <div class='product-copyright'> <?= $product->get_attribute('copyright') ?> </div> </div> <!-- END IMG WRAP --> <div class='product-type-wrapper'> <div class='product-puzzle-type'><?= h($product->get_attribute('puzzle_type')) ?></div> <div class='product-diff-icons'> <a href='/puzzle-difficulty-key' class='fancybox.iframe diff-modal-link'> <img data-ot="Stave Puzzle Type: <em><?=$product->get_attribute('puzzle_type')?></em><div class='<?=$product->get_attribute('puzzle_type')?> hover-diff-text'><?=$diff_text?></div><div class='hover-diff-click'>Click for more details...</div>" data-ot-delay="0" src='<?=$diff_img_path?>'> </a> </div> </div> <? if (!$product->description && $product->get_attribute('puzzle_type') == "Traditional") { $d = $trad_default; } else if ($product->get_attribute('puzzle_type') == "In-Stock Traditional") { $d = $product->description . $is_trad_default; } else { $d = $product->description; } ?> <div class='product-description'><?=$d?></strong></div> <div class='product-attributes clearfix'> <div class='product-attributes-dimensions'><?=$dims?></div> <? if ($num_pieces > 0) : ?> <div class='product-attributes-pieces'><?=$num_pieces ?> pieces</div> <? endif ?> <? if($product->artist) : ?> <div class='product-attributes-artist'>Artist: <a href='/artist/<?=$product->artist->url_name?>'><?= $product->artist->first_name ?> <?= $product->artist->last_name ?></a> </div> <? if($product->x_stave_designer) : ?> <div class='product-attributes-artist'>Designer: <?= $product->x_stave_designer ?></div> <? endif ?> <? endif ?> <? if($product->get_attribute('designer')) : ?> <div class='product-attributes-artist'>Designer: <?= $product->get_attribute('designer') ?></a> </div> <? endif ?> <div class='product-price-wrapper'> <? if ($product->get_attribute("puzzle_type") != "Traditional") { ?> <div class='product-price product-price-full'>full price: <?= format_currency($product->get_attribute('full_price')) ?> </div> <div class='product-price product-price-web'>web price: <? if ($on_sale): ?> <span class="oldprice"><?= format_currency($product->om('price', $posted_options)) ?></span> <? endif ?> <?= format_currency($product->om('sale_price', $posted_options)) ?> </div> <? } else { ?> <div class='product-price product-price-web'> <span class='starting-at'>prices starting at:</span> <? if ($on_sale): ?> <span class="oldprice"><?= format_currency($product->om('price', $posted_options)) ?></span> <? endif ?> <?= format_currency($product->om('sale_price', $posted_options)) ?> </div> <? } ?> <div class='mobile-only mobile-cart-button'> <a class="button" id='add_to_basket2' href="#" data-ajax-handler="stavecustomizations:on_addToCart" data-ajax-update="mini-cart=shop:mini_cart, product-page=shop:product">Add to Basket</a> </div> </div> </div> <? $isi = StavePuzzles_Helper::get_in_stock_info($product); $instock_sizes_str = $product->get_attribute('in_stock_sizes'); $instock_sizes = explode(", ",$instock_sizes_str); ?> <div class='product-in-stock-message clearfix <?=$isi->css_class?>'> <?= $isi->message; ?> <? if (count($instock_sizes) > 0 && $instock_sizes_str) { $instock_sizes_str = str_replace(" " , "",$instock_sizes_str); $instock_sizes_str = str_replace("," , ", ",$instock_sizes_str); echo "<div class='product-in-stock-sizes'>Sizes in-stock: " . $instock_sizes_str . " pieces</div>"; } ?> </div> </div> <div class='row'> <div class='twelve columns'> <div class='product-options'> <? $this->render_partial('stavepricetable:size_dropdown') ?> <? $this->render_partial('shop:product_options') ?> <? StaveCustomizations_Helper::custom_questions($product) ?> <? if (!$product->om('disabled', $posted_options) && $product->enabled): ?> <? $this->render_partial('shop:product_added_to_cart') ?> <div class="row add-to-cart-block"> <div class="four columns">&nbsp;</div> <div class="five columns"> <label style='width:40px;display:inline'>Qty: </label> <input type="text" value="1" name="product_cart_quantity" style="display:inline;width:60px"/> <input type="hidden" name="redirect" value="<?= root_url('basket/') ?>"> <a class="huge button" id='add_to_basket' href="#" data-ajax-handler="stavecustomizations:on_addToCart" data-ajax-update="mini-cart=shop:mini_cart, product-page=shop:product">Add to Basket</a> <? if ($this->customer) : ?> <a class="button" href="#" data-ajax-handler="wish:on_addToList" data-ajax-update="product-page=shop:product">Add to Wishlist</a> <? endif ?> <input type="hidden" name="product_id" value="<?= $product->id ?>"> </div> </div> <? else: ?> <div class="not-available"><p>This product is not currently available.</p></div> <? endif ?> </div> <? $related_products = $product->list_related_products()->find_all() ?> <? if ($related_products->count): ?> <div class="related-items product-list twelve columns"> <h3>You might also like:</h3> <div class="row related-products'> <? $this->render_partial('shop:product_list', array('products'=>$related_products)) ?> </div> </div> <? endif ?> </div> </div> <script> window.pid = <?=$product->id?>; </script> ', 'CMS partial', 'shop:product', array(0)) /modules/cms/classes/cms_controller.php 1020
13 Cms_Controller->render_partial('shop:product') /modules/cms/classes/cms_controller.php(383) : eval()'d code 15
12 eval(()) /modules/cms/classes/cms_controller.php 383
11 Cms_Controller->evalWithException('?><div class="row"> <div class="content twelve columns"> <div class="product-details nine columns" style='float:right'> <?= open_form(array('class'=>'custom', 'onsubmit'=>'return false')) ?> <? if ($product_unavailable): ?> <h2>We are sorry, the product is unavailable.</h2> <? elseif (!$product): ?> <h2>We are sorry, the requested product was not found.</h2> <? else: ?> <div class="row" id="product-page"> <? $this->render_partial('shop:product') ?> </div> <? endif ?> <?= close_form() ?> <div class="three columns categories"> <? $this->render_partial('stave:right_column') ?> </div> </div> </div> </div> <script src='/js/stave_product_page.js'></script>', 'CMS page', 'Product details page.') /modules/cms/classes/cms_controller.php 608
10 Cms_Controller->eval_page_content(()) /modules/cms/classes/cms_controller.php 198
9 Cms_Controller->open(object(Cms_Page), array(1) [0 => 'something-to-crow-about']) /controllers/application.php 72
8 Application->On404(())
7 call_user_func_array(array(2) [0 => object(Application), 1 => 'On404'], array(0)) /phproad/modules/phpr/classes/phpr_controller.php 170
6 Phpr_Controller->executeAction('On404', array(0)) /phproad/modules/phpr/classes/phpr_controller.php 84
5 Phpr_Controller->_run('On404', array(0)) /phproad/modules/phpr/classes/phpr_response.php 64
4 Phpr_Response->open404(()) /phproad/modules/phpr/classes/phpr_response.php 37
3 Phpr_Response->open('/product/something-to-crow-about') /phproad/system/phproad.php 31
2 include('/var/www/vhosts/stavepuzzles.com/phproad/system/phproad.php') /boot.php 114
1 require_once('/var/www/vhosts/stavepuzzles.com/boot.php') /index.php 3