VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: mbrando on August 15, 2012, 20:53:56 PM

Title: title does not display in pop-up when adding to cart
Post by: mbrando on August 15, 2012, 20:53:56 PM
Hi,

When I title has quotes in it it does not display in the pop up when adding to cart.

Any one know where this part of the code is so I can HTML encode the title for this display?

See attached it just says, "was added to your cart." It should have the title before the was. But when quotes are in the title the output is breaking this.

Customer wants quotes in the titles. I'm trying make it work for them.

- Mike

[attachment cleanup by admin]
Title: Re: title does not display in pop-up when adding to cart
Post by: TrigWebDesignUSA on October 08, 2012, 16:53:01 PM
I'm having the same issue, my client sells Letters and Numbers and has "Quotes" for inches. I really don't want to reprogram 'in' instead of " for 300+ products, is there a solution for this yet??

Please help I want to make the new site live and this is yet another VM2 error that I have to get past.
Title: Re: title does not display in pop-up when adding to cart
Post by: mbrando on October 08, 2012, 16:56:10 PM
Hi,

You'll have to find the title output and HTML encode is before the title displays. I don't think they have this on their bud list yet.

- Mike
Title: Re: title does not display in pop-up when adding to cart
Post by: TrigWebDesignUSA on October 08, 2012, 17:18:41 PM
Ok Mike, I will take a crack at it - if I find anything, I will reply here. You still need this?
Title: Re: title does not display in pop-up when adding to cart
Post by: TrigWebDesignUSA on October 08, 2012, 17:37:44 PM
I found where it's parsed, it's in vmprices.js in Components\Virtuemart\Assests\js\
Line 68 & 75
$.facebox({ text: datas.msg +"<H4>"+txt+"</H4>" }, 'my-groovy-style');

How can I change the " in the string so it doesn't end the call with a quotation?
or can I add a string to strip the quotes out of the Product Title?

EDIT: I later took out the +"<H4>"+txt+"</H4>" from the lines, so now it just says 'The product was added to your cart'. If someone has a real solution, I would greatly appreciate it.