Skip to content

Instantly share code, notes, and snippets.

@rameshelamathi
Last active May 2, 2019 06:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rameshelamathi/20a35cc5d883aa92ac4443b0b9e1e811 to your computer and use it in GitHub Desktop.
Save rameshelamathi/20a35cc5d883aa92ac4443b0b9e1e811 to your computer and use it in GitHub Desktop.
Patching Instructions
IMPORTANT: Take a FULL BACKUP of the site before you implement the instructions below.
Step 1:
Edit /administrator/components/com_j2store/helpers/utilities.php
Replace its contents with this: https://gist.github.com/rameshelamathi/1a803121e40bf7a3ec321c73550ce002
Step 2:
Edit /administrator/components/com_j2store/helpers/product.php
Around line number 643, you will find
'option_value' => $option_value,
Change this to
J2Store::utilities()->text_sanitize($option_value),
Step 3:
Edit components/com_j2store/views/carts/view.html.php
Around line number 51, you will find
$postcode = $this->input->getString('postcode','');
Change this to
$postcode = $this->input->getAlnum('postcode','');
Step 4:
Edit administrator/components/com_j2store/library/selectable/fields.php
Around line 183, you will find
$query->where('a.country_id='.$this->country_id);
Change this to
$query->where('a.country_id='.$db->q($this->country_id));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment