Skip to content

Instantly share code, notes, and snippets.

View gunjanpatel's full-sized avatar

Gunjan Patel gunjanpatel

View GitHub Profile

redSHOP - Sagepay Integration Help

  • A unique Vendor name and encryption password are provided when Sage Pay create a test account for you. This data is emailed to the contacts registered on the account. Please email support@sagepay.com if you need reminding of your passwords.

  • Your test encryption password is unlikely to be the same as your live encryption password.

  • The encryption password is the 16-character string that will look something like: SFLs9HnK3SjHbM0O

  • To use simulator mode you can create your own simulator account at: https://support.sagepay.com/apply/RequestSimAccount.aspx Or, you can use our simulator account (details supplied with the component) if you only want to use Simulator mode to generate a IP address error - this will display your server address as seen by the SagePay server.

@gunjanpatel
gunjanpatel / regular expression.md
Last active December 30, 2015 09:00
Use full Regular Expression with redSHOP using Sublime Text 2 or 3 and PhpStorm

Find for loop for Code Style improvement by calculate the length of the loop in advance

Target: for ($i = 0; $i < count($columns); $i++)

Search: \(((\$\w) = \d); \$\w\s<\s(count\(\$(\w+)\)); (\$\w\+\+)\)

Replace: ($1, $2n = $3; $2 < $2n; $5)

Get string between

@gunjanpatel
gunjanpatel / js filter string
Last active December 16, 2015 21:48
Javascript input filter validation for vulnerabilities
frmUserfieldName.replace(/[^a-z0-9]/gi, '_').toLowerCase();
@gunjanpatel
gunjanpatel / git remote update.sh
Created May 2, 2013 13:07
Update local git repository with upstream server in few clicks
#!/bin/bash
clear
echo -n "Please Enter directory where you have clone your fork: "
read dir_path
echo "Directory entered: $dir_path "
if cd $dir_path; then
echo -n "Please Enter remote name: "
@gunjanpatel
gunjanpatel / createSvnUser.md
Last active December 17, 2015 07:39
How to create SVN ( subversion / svn ) user using command line in Linux.

Create SVN Authenticaiton user using htpasswd in Linux

  • Open Terminal ( Ctrl + Alt + t )
  • Go to etc directory using cd command
cd /etc/
  • Check for availability of svn-auth-conf using command
<?php
$rsUserhelper = new rsUserhelper;
$shopper_group_id = $rsUserhelper->getShopperGroup($user->id);
$shopper_group_data = $rsUserhelper->getShopperGroupList($shopper_group_id);
echo "<pre>";
print_r($shopper_group_data);
echo "</pre>";
@gunjanpatel
gunjanpatel / proportional_resizing.patch
Created June 12, 2013 12:57
Incorrect thumbnail size (for redSHOP 1.2 or previous releases) fix - Automatic Process
Index: administrator/components/com_redshop/controllers/configuration.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- administrator/components/com_redshop/controllers/configuration.php (revision )
+++ administrator/components/com_redshop/controllers/configuration.php (revision )
@@ -253,8 +253,8 @@
echo $msg = JText::_('COM_REDSHOP_NEWSLETTER_SEND_TO_TEST_EMAIL');
}
@gunjanpatel
gunjanpatel / discount_shopper_group_price.patch
Created June 19, 2013 10:00
redSHOP discount for shopper group is not working. Apply this patch to fix discount for shopper group issue.
Index: components/com_redshop/helpers/product.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- components/com_redshop/helpers/product.php (revision )
+++ components/com_redshop/helpers/product.php (revision )
@@ -188,53 +188,78 @@
public function getProductSpecialPrice($product_price, $discount_product_id, $product_id = 0)
@gunjanpatel
gunjanpatel / git tag.md
Created June 26, 2013 11:42
working with git tag

How to: Create a remote Git tag

  • Simply listing the available tags in Git is very straightforward. Just type ‘git tag’.
$ git tag
0.1
1.3
@gunjanpatel
gunjanpatel / phpEnvVariable.md
Last active December 19, 2015 01:09
php pear installation | windows environmental variables

Pear BIN

Variable: PHP_PEAR_BIN_DIR

Value: D:\Development\xampp\php

Pear DATA

Variable: PHP_PEAR_DATA_DIR