News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

False rendering with the product name that has quotation mark in vmprices.js

Started by blackjet9999, December 12, 2012, 00:47:52 AM

Previous topic - Next topic

blackjet9999

I'm using Joomla 2.5 and Virtuemart 2.0.6

If the item title has a quotation mark, the title will only show the characters before the quotation.

For example, if a product name is 42" LED TV, the popup shows only 42.

How would I fix this?

I've known this bug by
jQuery(document).ready(function($) {

for (var i = 0; i < $("form.product").length; i++){
var cart = $("form.product")[i];
cart = jQuery(cart);
console.log(cart.find(".pname"));
}

Virtuemart.product($("form.product"));

$("form.js-recalculate").each(function(){
if ($(this).find(".product-fields").length) {
var id= $(this).find('input[name="virtuemart_product_id[]"]').val();
Virtuemart.setproducttype($(this),id);

}
});
});

blackjet9999

This has been fixed by replacing this code in this file: com_virtuemart/virtuemart/default_products.php
from:
<input type="hidden" class="pname" value="<?php echo $product->product_name ?>">
to:
<input type="hidden" class="pname" value="<?php echo htmlentities($product->product_name?>">

Cheers!

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/