File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed
Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,13 @@ $(function () {
9393 }
9494 }
9595
96+ if ( variation [ 'weight' ] ) {
97+ let weightHolder = pdb . find ( '.store-product-weight-value' ) ;
98+ if ( weightHolder ) {
99+ $ ( weightHolder ) . html ( variation [ 'weight' ] ) ;
100+ }
101+ }
102+
96103 var quantityField = pdb . find ( '.store-product-qty' ) ;
97104 if ( variation [ 'maxCart' ] !== false ) {
98105 quantityField . prop ( 'max' , variation [ 'maxCart' ] ) ;
Original file line number Diff line number Diff line change @@ -269,7 +269,7 @@ class="store-product-price"
269269 ?>
270270 <div class="store-product-weight">
271271 <strong><?= t ("Weight " ) ?> :</strong>
272- <?= $ product ->getWeight () ?>
272+ <span class="store-product-weight-value"> < ?= $ product ->getWeight () ?> </span >
273273 <?= $ config ->get ('community_store.weightUnit ' ) ?>
274274 </div>
275275 <?php
@@ -689,6 +689,7 @@ class="img-responsive img-fluid"
689689 'imageThumb ' => $ thumb ? $ thumb ->src : '' ,
690690 'image ' => $ imgObj ? $ imgObj ->getRelativePath () : '' ,
691691 'sku ' => $ variation ->getVariationSKU (),
692+ 'weight ' => $ variation ->getVariationWeight (),
692693 'saleTemplate ' => t ('On Sale ' ) .': <span class="store-sale-price"></span> ' . t ('was ' ) . ' <span class="store-original-price"></span> '
693694 ];
694695 if ($ isWholesale ) {
Original file line number Diff line number Diff line change @@ -409,7 +409,7 @@ public function setVariationLength($pvLength)
409409
410410 public function getVariationWeight ()
411411 {
412- return $ this ->pvWeight ;
412+ return $ this ->pvWeight + 0 ;
413413 }
414414
415415 public function setVariationWeight ($ pvWeight )
You can’t perform that action at this time.
0 commit comments