diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index f886f4bbc..0e00eb728 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -22,6 +22,7 @@ - fixed: Cannot embed YouTube videos in IE6/7. Fixed by adding an "Allow Media" switch to the RichEdit asset. - added: Next and Previous GalleryAlbum links in the GalleryAlbum views + - fixed: Shop: Variants in dropdown and on page 7.5.12 - skipping this release diff --git a/docs/upgrades/packages-7.5.13/default_product.wgpkg b/docs/upgrades/packages-7.5.13/default_product.wgpkg new file mode 100644 index 000000000..4ee92255f Binary files /dev/null and b/docs/upgrades/packages-7.5.13/default_product.wgpkg differ diff --git a/lib/WebGUI/Asset/Sku/Product.pm b/lib/WebGUI/Asset/Sku/Product.pm index bec0938e8..a03f93d54 100644 --- a/lib/WebGUI/Asset/Sku/Product.pm +++ b/lib/WebGUI/Asset/Sku/Product.pm @@ -1547,8 +1547,8 @@ sub view { value => [0], }, ); - $var{buy_button} = WebGUI::Form::submit($session, { value => $i18n->get('add to cart') } ); - $var{inStock} = 1; + $var{buy_button} = WebGUI::Form::submit($session, { value => $i18n->get('add to cart') } ); + $var{in_stock} = 1; } else { $var{in_stock} = 0; @@ -1558,6 +1558,7 @@ sub view { if ($self->canEdit) { $var{'addvariant_url'} = $self->getUrl('func=editVariant'); $var{'addvariant_label'} = $i18n->get('add a variant'); + $var{'canEdit'} = 1; } $var{variant_loop} = \@variantLoop; $var{hasAddedToCart} = $self->{_hasAddedToCart}; diff --git a/lib/WebGUI/Help/Asset_Product.pm b/lib/WebGUI/Help/Asset_Product.pm index 77e17271e..4c58556ad 100644 --- a/lib/WebGUI/Help/Asset_Product.pm +++ b/lib/WebGUI/Help/Asset_Product.pm @@ -18,6 +18,7 @@ our $HELP = { ], fields => [], variables => [ + { 'name' => 'canEdit' }, { 'name' => 'brochure_icon' }, { 'name' => 'brochure_url' }, { 'name' => 'brochure_label' }, diff --git a/lib/WebGUI/i18n/English/Asset_Product.pm b/lib/WebGUI/i18n/English/Asset_Product.pm index 5406cd017..176a149ef 100644 --- a/lib/WebGUI/i18n/English/Asset_Product.pm +++ b/lib/WebGUI/i18n/English/Asset_Product.pm @@ -829,6 +829,12 @@ be useful, others may not.|, context => q|template variable| }, + 'canEdit' => { + message => q|A boolean that is true if the user can edit this Product.|, + lastUpdated => 0, + context => q|template variable| + }, + }; 1;