From 86e05332fd26b1a62151acc5bf05127117924522 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Sun, 11 Aug 2002 01:47:14 +0000 Subject: [PATCH] Removed outdated code. --- lib/WebGUI/Wobject/Product.pm | 170 +--------------------------------- 1 file changed, 1 insertion(+), 169 deletions(-) diff --git a/lib/WebGUI/Wobject/Product.pm b/lib/WebGUI/Wobject/Product.pm index 6a9b6c051..2883bb3fe 100644 --- a/lib/WebGUI/Wobject/Product.pm +++ b/lib/WebGUI/Wobject/Product.pm @@ -43,174 +43,6 @@ sub _fileProperty { return $f->printRowsOnly; } -#------------------------------------------------------------------- -sub _layoutStandard { - my ($output, %data, $sth, $rows, $file, @column, $i, $seperator); - tie %data, 'Tie::CPHash'; - $output = $_[0]->displayTitle; - $output .= '
'; - $output .= $_[0]->description; - $output .= ''.WebGUI::International::get(10,$namespace).': '.$_[0]->get("price").'
' if ($_[0]->get("price") ne ""); - $output .= ''.WebGUI::International::get(11,$namespace).': '.$_[0]->get("productNumber") if ($_[0]->get("productNumber") ne ""); - $output .= '

'; - if ($_[0]->get("brochure")) { - $file = WebGUI::Attachment->new($_[0]->get("brochure"),$_[0]->get("wobjectId")); - $output .= ''.WebGUI::International::get(13,$namespace).'
'; - } - if ($_[0]->get("manual")) { - $file = WebGUI::Attachment->new($_[0]->get("manual"),$_[0]->get("wobjectId")); - $output .= ''.WebGUI::International::get(14,$namespace).'
'; - } - if ($_[0]->get("warranty")) { - $file = WebGUI::Attachment->new($_[0]->get("warranty"),$_[0]->get("wobjectId")); - $output .= ''.WebGUI::International::get(15,$namespace).'
'; - } - $output .= '

'; - if ($_[0]->get("image1")) { - $file = WebGUI::Attachment->new($_[0]->get("image1"),$_[0]->get("wobjectId")); - $output .= '

'; - } - if ($_[0]->get("image2")) { - $file = WebGUI::Attachment->new($_[0]->get("image2"),$_[0]->get("wobjectId")); - $output .= '

'; - } - if ($_[0]->get("image3")) { - $file = WebGUI::Attachment->new($_[0]->get("image3"),$_[0]->get("wobjectId")); - $output .= '

'; - } - $output .= '

'; - $output .= ''; - $output .= ''; - $sth = WebGUI::SQL->read("select feature,productFeatureId from Product_feature where wobjectId=".$_[0]->get("wobjectId")." order by sequenceNumber"); - $rows = $sth->rows; - if ($rows > 0 || $session{var}{adminOn}) { - $column[$i] = ''; - $i++; - } - $sth->finish; - $sth = WebGUI::SQL->read("select benefit,productBenefitId from Product_benefit where wobjectId=".$_[0]->get("wobjectId")." order by sequenceNumber"); - $rows = $sth->rows; - if ($rows > 0 || $session{var}{adminOn}) { - $column[$i] = ''; - $i++; - } - $sth->finish; - $sth = WebGUI::SQL->read("select name,value,units,productSpecificationId from Product_specification - where wobjectId=".$_[0]->get("wobjectId")." order by sequenceNumber"); - $rows = $sth->rows; - if ($rows > 0 || $session{var}{adminOn}) { - $column[$i] = ''; - $i++; - } - $sth->finish; - $sth = WebGUI::SQL->read("select wobject.title,page.urlizedTitle,Product_accessory.accessoryWobjectId from Product_accessory,wobject,page - where Product_accessory.wobjectId=".$_[0]->get("wobjectId")." - and Product_accessory.accessoryWobjectId=wobject.wobjectId and wobject.pageId=page.pageId order by Product_accessory.sequenceNumber"); - $rows = $sth->rows; - if ($rows > 0 || $session{var}{adminOn}) { - $column[$i] = ''; - $i++; - } - $sth->finish; - $sth = WebGUI::SQL->read("select wobject.title,page.urlizedTitle,Product_related.relatedWobjectId from Product_related,wobject,page - where Product_related.wobjectId=".$_[0]->get("wobjectId")." - and Product_related.relatedWobjectId=wobject.wobjectId and wobject.pageId=page.pageId order by Product_related.sequenceNumber"); - $rows = $sth->rows; - if ($rows > 0 || $session{var}{adminOn}) { - $column[$i] = ''; - $i++; - } - $sth->finish; - $seperator = ''; - $output .= join($seperator,@column); - $output .= ''; - $output .= '
'; - $column[$i] .= '
'.WebGUI::International::get(30,$namespace).'
'; - if ($session{var}{adminOn}) { - $column[$i] .= ''.WebGUI::International::get(34,$namespace).'

'; - } - } - while (%data = $sth->hash) { - if ($session{var}{adminOn}) { - $column[$i] .= deleteIcon('func=deleteFeature&wid='.$_[0]->get("wobjectId").'&fid='.$data{productFeatureId}) - .editIcon('func=editFeature&wid='.$_[0]->get("wobjectId").'&fid='.$data{productFeatureId}) - .moveUpIcon('func=moveFeatureUp&wid='.$_[0]->get("wobjectId").'&fid='.$data{productFeatureId}) - .moveDownIcon('func=moveFeatureDown&wid='.$_[0]->get("wobjectId").'&fid='.$data{productFeatureId}); - } - $column[$i] .= '·'.$data{feature}.'
'; - } - if ($rows > 0 || $session{var}{adminOn}) { - $column[$i] .= '

'; - $column[$i] .= '
'.WebGUI::International::get(54,$namespace).'
'; - if ($session{var}{adminOn}) { - $column[$i] .= ''.WebGUI::International::get(55,$namespace).'

'; - } - } - while (%data = $sth->hash) { - if ($session{var}{adminOn}) { - $column[$i] .= deleteIcon('func=deleteBenefit&wid='.$_[0]->get("wobjectId").'&bid='.$data{productBenefitId}) - .editIcon('func=editBenefit&wid='.$_[0]->get("wobjectId").'&bid='.$data{productBenefitId}) - .moveUpIcon('func=moveBenefitUp&wid='.$_[0]->get("wobjectId").'&bid='.$data{productBenefitId}) - .moveDownIcon('func=moveBenefitDown&wid='.$_[0]->get("wobjectId").'&bid='.$data{productBenefitId}); - } - $column[$i] .= '·'.$data{benefit}.'
'; - } - if ($rows > 0 || $session{var}{adminOn}) { - $column[$i] .= '

'; - $column[$i] .= '
'.WebGUI::International::get(31,$namespace).'
'; - if ($session{var}{adminOn}) { - $column[$i] .= ''.WebGUI::International::get(35,$namespace).'

'; - } - } - while (%data = $sth->hash) { - if ($session{var}{adminOn}) { - $column[$i] .= deleteIcon('func=deleteSpecification&wid='.$_[0]->get("wobjectId").'&sid='.$data{productSpecificationId}) - .editIcon('func=editSpecification&wid='.$_[0]->get("wobjectId").'&sid='.$data{productSpecificationId}) - .moveUpIcon('func=moveSpecificationUp&wid='.$_[0]->get("wobjectId").'&sid='.$data{productSpecificationId}) - .moveDownIcon('func=moveSpecificationDown&wid='.$_[0]->get("wobjectId").'&sid='.$data{productSpecificationId}); - } - $column[$i] .= '·'.$data{name}.': '.$data{value}.' '.$data{units}.'
'; - } - if ($rows > 0 || $session{var}{adminOn}) { - $column[$i] .= '

'; - $column[$i] .= '
'.WebGUI::International::get(32,$namespace).'
'; - if ($session{var}{adminOn}) { - $column[$i] .= ''.WebGUI::International::get(36,$namespace).'

'; - } - } - while (%data = $sth->hash) { - if ($session{var}{adminOn}) { - $column[$i] .= deleteIcon('func=deleteAccessory&wid='.$_[0]->get("wobjectId").'&aid='.$data{accessoryWobjectId}) - .moveUpIcon('func=moveAccessoryUp&wid='.$_[0]->get("wobjectId").'&aid='.$data{accessoryWobjectId}) - .moveDownIcon('func=moveAccessoryDown&wid='.$_[0]->get("wobjectId").'&aid='.$data{accessoryWobjectId}); - } - $column[$i] .= '·'.$data{title}.'
'; - } - if ($rows > 0 || $session{var}{adminOn}) { - $column[$i] .= '

'; - $column[$i] .= '
'.WebGUI::International::get(33,$namespace).'
'; - if ($session{var}{adminOn}) { - $column[$i] .= ''.WebGUI::International::get(37,$namespace).'

'; - } - } - while (%data = $sth->hash) { - if ($session{var}{adminOn}) { - $column[$i] .= deleteIcon('func=deleteRelated&wid='.$_[0]->get("wobjectId").'&rid='.$data{relatedWobjectId}) - .moveUpIcon('func=moveRelatedUp&wid='.$_[0]->get("wobjectId").'&rid='.$data{relatedWobjectId}) - .moveDownIcon('func=moveRelatedDown&wid='.$_[0]->get("wobjectId").'&rid='.$data{relatedWobjectId}); - } - $column[$i] .= '·'.$data{title}.'
'; - } - if ($rows > 0 || $session{var}{adminOn}) { - $column[$i] .= '

'; - return $_[0]->processMacros($output); -} - #------------------------------------------------------------------- sub _reorderAccessories { my ($sth, $i, $id); @@ -1132,7 +964,7 @@ sub www_moveSpecificationUp { #------------------------------------------------------------------- sub www_view { - my ($output, %data, $sth, $rows, $file, $i, $segment, $template); + my ($output, %data, $sth, $file, $segment, $template); tie %data, 'Tie::CPHash'; $output = $_[0]->displayTitle; ($template) = WebGUI::SQL->quickArray("select template from Product_template where productTemplateId=".$_[0]->get("productTemplateId"));