- This topic has 6 replies, 3 voices, and was last updated 14 years, 2 months ago by .
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › Variations and the double quote character/inches
I saw a comment a while back about the use of double quotes in product variations to denote the inch unit (e.g. 12″ x 8″). This works fine for the drop-down variation box but appears to break the shopping basket. Is this an easy fix?
I’m currently running v4.1.0, do future updates appear in the plugins area within WordPress?
The variation data is read by a Javascript which causes an issue if there are quotes (“) in the string as it’s a special character. You can use the following in your variation:
12 Inch x 8 Inch
There must be a fix to escape double quotes in the code. I’ll have a go at fixing.
Fixed The PHP function htmlspecialchars does the trick, but needs to be applied in a few places:
eStore_button_display_helper.php, the variation option code should be changed to this <option value="'.htmlspecialchars($tmp_txt).'">'.$tmp_txt.'</option>
eStore_payment_submission.php, references to the item name should be changed to this htmlspecialchars($item)
Thank you for following it up and providing the solution. I have been meaning to go in the code and fix it up but it has never been a big issue so it kinda got low priority all the time
I have made the changes in the plugin code.
I’d like to confirm that in the first file there were 4 places; and in the second file, there were 7 places; that said changes had to take place.
Yeah.