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 .= ' | ';
- 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 .= ' |
| ';
- $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] .= ' | ';
- $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] = '';
- $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] .= ' | ';
- $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] = '';
- $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] .= ' | ';
- $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] = '';
- $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] .= ' | ';
- $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] = '';
- $column[$i] .= '';
- 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] .= ' | ';
- $i++;
- }
- $sth->finish;
- $seperator = '