Skip to content

Commit

Permalink
Updates for "product_quick_view"
Browse files Browse the repository at this point in the history
  • Loading branch information
influxweb committed Dec 4, 2014
1 parent ee63e43 commit a2bdf20
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2014.12.04
----------
* Replaced hard-coded store code with Miva variable in "product_quick_view" on PROD page.
* Added ID to form in "product_quick_view" on PROD page to facilitate dynamic pricing when inventory variants are not being used.
* Reverted conditional in scripts.js at line 503 checking for "attrMachCall".

2014.12.02
----------
* Corrected improperly closed SMALL tag at line 116 of "Basket Contents" in BASK page.
Expand Down
2 changes: 1 addition & 1 deletion assets/js/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ var cornerstoneUX = {
});

// ---- Update Display Price Based on Attribute Selections (If Attribute Machine Is Not Being Used) ---- //
if (document.getElementById('js-product-attribute-count').value > 0) {
if (typeof attrMachCall === 'undefined' && document.getElementById('js-product-attribute-count').value > 0) {
for(var baseProductPrice=Number(document.getElementById("js-price-value").getAttribute("data-base-price")),regularProductPrice=Number(),productAttributeCount=Number(document.getElementById("js-product-attribute-count").value+1),productAttributes=document.getElementById("js-purchase-product").elements,attributeType=[""],i=0;i<productAttributes.length;i++){var tagName=productAttributes[i].tagName.toLowerCase(),elementType=productAttributes[i].type,type=productAttributes[i].getAttribute("data-attribute-type"), name=productAttributes[i].name;"hidden"==elementType&&null!=type&&attributeType.push(type);productAttributes[i].onchange=function(){updateProductDisplayPrice()}} function updateProductDisplayPrice(){for(var b,a,c=baseProductPrice,f=regularProductPrice,d=1;d<productAttributeCount;d++)if(b=document.getElementsByName("Product_Attributes["+d+"]:value"),"select"==attributeType[d])for(var e=0;e<b.length;e++)a=b.item(e),a=a.options.item(a.selectedIndex),c+=Number(a.getAttribute("data-option-price")),f+=Number(a.getAttribute("data-regular-price"));else if("radio"==attributeType[d]||"checkbox"==attributeType[d])for(e=0;e<b.length;e++)a=b.item(e),a.checked&&(c+=Number(a.getAttribute("data-option-price")), f+=Number(a.getAttribute("data-regular-price")));else if("text"==attributeType[d]||"memo"==attributeType[d])a=b.item(0),a.value&&(c+=Number(a.getAttribute("data-option-price")),f+=Number(a.getAttribute("data-regular-price")));b=document.getElementsByName("Quantity");c*=Number(b.item(0).value);b.item(0);document.getElementById("js-price-value").innerHTML=formatCurrency(c);document.getElementById("js-mobile-price-value")&&(document.getElementById("js-mobile-price-value").innerHTML=formatCurrency(c))} function formatCurrency(b){var a=!1;0>b&&(a=!0,b=Math.abs(b));return(a?"-$":"$")+parseFloat(b,10).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g,"$1,").toString()}updateProductDisplayPrice();
};

Expand Down
11 changes: 2 additions & 9 deletions assets/page templates/PROD-product_quick_view-item.htm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</div>
<mvt:item name="product_display_imagemachine" param="body:product:id" />
<div class="row">
<p class="column whole align-left small"><a href="&mvte:global:sessionurl;Store_Code=suivant&Screen=PROD&Product_Code=&mvta:product:code;" target="_parent">View Product Details &raquo;</a></p>
<p class="column whole align-left small"><a href="&mvte:global:sessionurl;Store_Code=&mvta:store:code;&Screen=PROD&Product_Code=&mvta:product:code;" rel="nofollow" target="_parent">View Product Details &raquo;</a></p>
</div>
</div>
<!-- end product-information--images -->
Expand All @@ -50,7 +50,7 @@ <h1 class="normal nm">&mvte:product:name;</h1>
</mvt:if>
</div>
</div>
<form method="post" action="&mvte:global:sessionurl;Screen=BASK" target="_parent" class="inline-labeling">
<form method="post" action="&mvte:global:sessionurl;Screen=BASK" target="_parent" id="js-purchase-product" class="inline-labeling">
<input type="hidden" name="Old_Screen" value="&mvte:global:Screen;" />
<input type="hidden" name="Old_Search" value="&mvte:global:Search;" />
<input type="hidden" name="Action" value="ADPR" />
Expand Down Expand Up @@ -96,13 +96,6 @@ <h1 class="normal nm">&mvte:product:name;</h1>
</div>
</div>
</form>
<div class="breaker"></div>
<div class="column whole np product-information--description">
<h4 class="nm uppercase">Product Details</h4>
<hr noshade />
&mvt:product:descrip;
</div>
<!-- end product-information--description -->
</div>
<!-- end product-information--purchase -->
</div>
Expand Down
Binary file modified suivant-readytheme.pkg
Binary file not shown.
Binary file modified suivant-readytheme.zip
Binary file not shown.

0 comments on commit a2bdf20

Please sign in to comment.