sNews Forum

sNews 1.7 (current stable version) => Programming/Mods-in-development => Topic started by: sibas on November 03, 2011, 01:21:14 PM

Title: Shopping cart in sNews
Post by: sibas on November 03, 2011, 01:21:14 PM
Hello all

I use all times http://www.opencart.com/ when I want to make some eshop in Internet.
But doesn't fit all time for small shops, let's say to sell only software.

I was looking long time now to find some program to fit with snews!
And I think I find jCart http://conceptlogic.com/jcart/

I play with jCart and snews from 10 am today and the results is this

http://dev.simply4all.net/snews-jcart/

Is semi working.

Here the steps I have make if someone interest to help

First install mod Article image
http://snewscms.com/forum/index.php?topic=9217.0

after I add the jCart files in snews root:

checkout.php
and I add the folder jcart

I make the necessary changes in files to find css and js,
I modified snews to add the shopping cart page
the steps I have made is:

line 105 I add checkout,
Code: [Select]
$l['cat_listSEF'] = 'checkout,archive,contact,sitemap,login';
in function pages() I add
Code: [Select]
$class = ($categorySEF == 'checkout') ? ' class="current"' : '';
echo '<li><a'.$class.' href="'._SITE.'checkout/">'.l('checkout').'</a></li>';


function center() in the last switch I add before case 'archive':
Code: [Select]
case 'checkout':
checkout(); break;

I make an empty function checkout()
Code: [Select]
function checkout(){
}

and finally add in EN.php
Code: [Select]
$l['checkout'] = 'Shopping cart';
In index.php I have
Code: [Select]
<?php include('snews.php'); include_once('jcart/jcart.php'); ?>
<?php
if (($_SERVER['REQUEST_URI']) == '/snews-jcart/' ) {
include_once(
'start-page.php');
}
elseif ((
$_SERVER['REQUEST_URI']) == '/snews-jcart/checkout/' ) {
include_once(
'checkout.php');
}
else{
include_once(
'start-page.php');
}
?>

strat-page.php is the normal index of snews
checkout.php is the checkout of jCart.

I don't know why when I click in checkout lost all data and says "Your cart is empty!"

Before I ask in jCart forum for help, I need first to see if what I have make with snews is OK

download

I have make some changes and I wait reply from jCart, as soon I make it work I give again the link for download.

Title: Re: Shopping cart in sNews
Post by: sibas on November 04, 2011, 10:58:33 AM
OK is working, here is the mod for shopping cart in snews

1) Download the jcart-1.3
http://code.google.com/p/jcart/downloads/list

2) Inside of snews add the jcart folder

3) Make one folder and name it "checkout" put inside the checkout.php and rename to index.php

4) The index of snews rename it to start-page.php (remove in beginning the php snews include )

add the js
Quote
<script type="text/javascript" src="jcart/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="jcart/js/jcart.js"></script>

add in #side
Quote
<div id="side">
<div id="jcart"><?php $jcart->display_cart();?></div>
<div class="single">

5)  Make an empty index.php and write the following
Code: [Select]
<?php  include_once('jcart/jcart.php'); include_once('snews.php'); ?>
<?php
if (($_SERVER['REQUEST_URI']) == '/folder-name/' ) {
include_once(
'start-page.php');
}
elseif ((
$_SERVER['REQUEST_URI']) == '/folder-name/checkout/' ) {
include_once(
'/checkout/index.php');
}
else{
include_once(
'start-page.php');
}
?>

NOTE: jcart.php must be before snews.php or before session_start();
this is important!
the structure now is


Modify sNews

6) Find
Quote
$l['cat_listSEF'] = 'archive,contact,sitemap,login';
and add checkout,
Quote
$l['cat_listSEF'] = 'checkout,archive,contact,sitemap,login';

7) In function pages()
find
Code: [Select]
echo '<li><a'.$class.' href="'._SITE.'">'.l('home').'</a></li>';
add after
Code: [Select]
$class = ($categorySEF == 'checkout') ? ' class="current"' : '';
echo '<li><a'.$class.' href="'._SITE.'checkout/">'.l('checkout').'</a></li>';

8 ) In function center()
in the last switch ($action)
add  before 'archive'
Code: [Select]
case 'checkout':
include_once('checkout/'); break;

9) Add a new function somewhere in snews
Code: [Select]
function jcartToken(){
echo $_SESSION['jcartToken'];
}

Modify jCart

1) Take all the styles from the 2 files of jcart and added at the bottom in css of snews, we go to use absolute path for this css so don't need to have 2-3 files of css.

2) modify the index.php in checkout *
*This is the most tricky as is not working if we include snews.php (base mess up with jcart)
so keep in mind this, and add at top
Code: [Select]
<?php include_once('../jcart/jcart.php'); session_start(); ?>
in style use absolute path to your style e.g.  http://yoursite.com/css/style.css
add those for js
Quote
<script type="text/javascript" src="../jcart/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="../jcart/js/jcart.js"></script>

3) In config.php you need to add the paths of your files
so add like this
Code: [Select]
// REQUIRED SETTINGS
// Path to your jcart files
$config['jcartPath']              = http://yoursite.com/jcart/';
// Path to your checkout page
$config['checkoutPath']           = 'checkout/';

4 Open jcart.js and modify the var path = 'jcart',
add absolute path to find the folder jcart
Code: [Select]
var path = 'http://yoursite.com/jcart/',
How to use

First read the install of jcart
http://conceptlogic.com/jcart/install.php

here is how I did in my demo writing an article
Quote
<form method="post" action="" class="jcart">
<fieldset>
<input type="hidden" name="jcartToken" value="[func]jcartToken:|:[/func]" />
<input type="hidden" name="my-item-id" value="ABC-123" />
<input type="hidden" name="my-item-name" value="sNews CMS with Shopping Cart" />
<input type="hidden" name="my-item-price" value="120.00" />
<input type="hidden" name="my-item-url" value="http://dev.simply4all.net/snews-jcart/software/snews-cms-with-shopping-cart/" />

<ul>
<li><strong>sNews CMS with Shopping Cart</strong></li>
<li>Price: $120.00</li>
<li><label>Qty: <input type="text" name="my-item-qty" value="1" size="3" /></label></li>
</ul>

<input type="submit" name="my-add-button" value="Add to cart" class="button" />
</fieldset>
</form>[break]
<br />
<h3>sNews with Shopping Cart</h3>
<p>lorem ypsum lorem</p>

That's all I hope you enjoy this mod :)

Future request (if you find useful this mod)
To use  additional form inside jcart.php so before checkout with paypal to collect all the necessary data
 http://snewscms.com/forum/index.php?topic=8657.0
In gateway.php have some notes please check them if someone can help about
read at
// Here you can add PHP code that validates the submitted prices against your database or validates against hard-coded prices.

 :)

Have a lot of fun!




 
Title: Re: Shopping cart in sNews
Post by: Keyrocks on November 04, 2011, 03:27:33 PM
Thanks for this Sibas.
I will have to try this out sometime in a couple of months when winter is here and I have time to do it.
Title: Re: Shopping cart in sNews
Post by: sibas on November 08, 2011, 06:29:47 PM
I look forward to expand further of this cart, trying for start only digital downloads I think is good idea.
Does anyone know how to made with snews sending email for download link when the payment is verifying with IPN.
Title: Re: Shopping cart in sNews
Post by: Rui Mendes on November 08, 2011, 07:47:25 PM
Thanks for this Sibas.

Some time ago, I think making a scart for snews, it's not dificult to do it.
I make this  (http://www.ebookcms.com/rte/downloads.html) to pay me a drink 

Sorry I don't know how to verify when person make the payment, But I'm would like to know.
Title: Re: Shopping cart in sNews
Post by: sibas on November 10, 2011, 01:51:52 AM
Well! I read the last 24 hours non stop
and here the most easy way to have a complete IPN system

from: https://www.paypaltech.com/SG2/
is a PayPal Script Generator
and if you choose IPN - PHP write to DB (mySQL)
you get ipn script with sql structure and you can modify anything you like.

Please test it to see what generates.

somewhere inside this file have
Quote
echo "Verified";
and sends notify email, here is where we can send also email for the download link.

Inside in jcart in config.php have at the end
Quote
// The URL of your PayPal IPN script
$config['paypal']['notifyUrl']    = '';

where when you have valid or invalid transaction from paypal inform this notifyUrl  where is the IPN script

Now, can anyone help me to find out how to send email with the download link when someone have a valid and verified transaction!
Title: Re: Shopping cart in sNews
Post by: sibas on November 17, 2011, 02:35:30 PM
OK I will try to keep this as simple I can!  ::)

This mod have 3 different parts

1) The cart, where is the shopping cart
http://snewscms.com/forum/index.php?topic=10316.msg68483#msg68483
is not finished yet, as needs to make it a mod to add automatically products
(this is go to be the next step when finish this one)

2) IPN, as I say above, from: https://www.paypaltech.com/SG2/ is a PayPal Script Generator
when someone buy something returns the data for the payment and products.
(this I go to make it as the last step)

3) The download section, where is this one
the progress is like this

1) User select from shopping cart one product
2) User goes to paypal and when is verifying the payment we send email with the data to download the product.
3) User add the data and download the product.

The mod for download is the following
1) We need a new table for downloads

Code: [Select]
DROP TABLE IF EXISTS downloads;

CREATE TABLE `downloads` (
  `id` int(11) primary key auto_increment,
  `itemid_id` varchar(50) default NULL,
  `itemname` varchar(100) default NULL,
  `itemurl` varchar(100) default NULL,
  `dlfile` varchar(100) default NULL,
  `user_name` varchar(50) default NULL,
  `user_surname` varchar(50) default NULL,
  `user_country` varchar(50) default NULL,
  `dluseremail` varchar(100) default NULL,
  `itemkey` varchar(10) NOT NULL default '12345',
  `ipaddress` int(11) UNSIGNED default NULL,
  `dltimes` int(11) NOT NULL default '0',
   INDEX ( `itemkey` , `dluseremail` )
) TYPE=MyISAM;

INSERT INTO `downloads` (`id`, `itemid_id`, `itemname`, `itemurl`, `dlfile`, `dluseremail`, `itemkey`, `ipaddress`, `dltimes`, `user_name`, `user_surname`, `user_country`) VALUES
(1, 'pr12345', 'sNews CMS with Shopping Cart', 'http://127.0.0.1/snews-jcart/software/snews-cms-with-shopping-cart/', 'cms-cart.zip', 'test@gmail.com', '12345', 2130706433, 3, 'test', NULL, NULL),
(2, '2341', 'New Standard Template', 'http://127.0.0.1/snews-jcart/templates/new-standard-template/', 'new-standard-template.zip', 'test2@gmail.com', '212345', 2130706433, 2, 'test1', NULL, NULL);


2) Make a new folder download
add the following index.php
Code: [Select]
<?php
include('../snews.php');

function 
dlitem() {
if (isset(
$_POST['submit']) == 'Submit') {
    
$query mysql_query("SELECT * FROM downloads WHERE dluseremail='{$_POST['username']}' AND itemkey='{$_POST['item']}'");  
$row mysql_fetch_array$query );
    
$dlfile $row['dlfile'];
$dluseremail $row['dluseremail'];
$itemid_id  $row['itemid_id'];
$itemname $row['itemname'];
$dltimes $row['dltimes'];
$ipaddress $row['ipaddress'];
$itemkey  $row['itemkey'];
$user_name $row['user_name'];
$dltimes $dltimes['max'] + 1;
        if (!empty(
$_SERVER['HTTP_CLIENT_IP'])){
            
$ipaddress $_SERVER['HTTP_CLIENT_IP'];
        } elseif (!empty(
$_SERVER['HTTP_X_FORWARDED_FOR'])){
            
$ipaddress $_SERVER['HTTP_X_FORWARDED_FOR'];
        } else { 
$ipaddress=$_SERVER['REMOTE_ADDR'];
        } 
    
$ipaddress ip2long($ipaddress);
   
    if ($row){
          if (
$dltimes 4) {
            echo 
'<br />Hello <em>'.$user_name.'</em>! Thank you for chosing the <b>'.$itemname.'</b><br />';
            echo 
'<a href="http://127.0.0.1/snews-jcart/download/download.php?f='.$dlfile.'">Download File</a>';
   } else {
    echo '<br /> <b>You have exceeded the limit of download this file</b>.';
    session_destroy();
    echo "<meta http-equiv='refresh' content='4;url=http://127.0.0.1/snews-jcart/'>";
}
        
$query mysql_query("SELECT ipaddress,dltimes FROM "._PRE."downloads WHERE dluseremail = '$dluseremail' AND itemkey = '$itemkey'");
        if (
mysql_num_rows($query)) {
            
mysql_query("UPDATE "._PRE."downloads SET 
    dltimes = '
$dltimes', 
    ipaddress='
$ipaddress
    WHERE dluseremail = '
$dluseremail' AND itemkey = '$itemkey' LIMIT 1");
   }
} else {
echo '<br /> Wrong email or file!';
    }
    }
}
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Download Software - sNews - jCart</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="robots" content="noindex,nofollow" />
<link rel="stylesheet" type="text/css" href="../css/style.css" />
</head>
<body>
<div id="wrapper">
<div id="header">
<div id="top">
<ul id="topmenu">
<li><a href="http://127.0.0.1/snews-jcart/">Home</a></li>
<li><a href="http://127.0.0.1/snews-jcart/checkout/">Shopping cart</a></li>
<li><a class="current" href="http://127.0.0.1/snews-jcart/download/">Download</a></li>
<li><a href="http://127.0.0.1/snews-jcart/archive/">Archive</a></li>
<li><a href="http://127.0.0.1/snews-jcart/contact/">Contact</a></li><li>
<a href="http://127.0.0.1/snews-jcart/sitemap/">Site Map</a></li>
</ul>
</div>
<div id="logo">
<h1>sNews - jCart</h1>
<p>sNews CMS with Shopping Cart</p>
</div>
</div>
<div id="crumbs"><a href="http://127.0.0.1/snews-jcart/">Home</a> &middot; Download</div>
<div id="content">
<div id="main">
<div class="left">
<form class="clearfix" action="" method="post">
<h1>Member download</h1>
<label class="grey" for="username">Username:</label>
<input class="field" type="text" name="username" id="username" value="" size="23" />
<label class="grey" for="item">File:</label>
<input class="field" type="text" name="item" id="item" size="23" />
        <div class="clear"></div>
<input type="submit" name="submit" value="Submit" class="bt_login" />
</form>
         <?php dlitem(); ?>
</div>
</div>
</div>
<div id="footer">
<p>This site is powered by <a href="http://snewscms.com/" title="sNews CMS" onclick="target='_blank';">sNews</a> <span>&amp;</span> <a href="http://conceptlogic.com/jcart/" title="jCart" onclick="target='_blank';">jCart</a></p>
</div>
</div>
</body>
</html>


modify this line to make it work with yours
Code: [Select]
echo '<a href="http://127.0.0.1/snews-jcart/download/download.php?f='.$dlfile.'">Download File</a>';
3) add the download.php
(this file I found it in internet)
Code: [Select]
<?php

###############################################################
# File Download 1.31
###############################################################
# Visit http://www.zubrag.com/scripts/ for updates
###############################################################
# Sample call:
#    download.php?f=phptutorial.zip
#
# Sample call (browser will try to save with new file name):
#    download.php?f=phptutorial.zip&fc=php123tutorial.zip
###############################################################

// Allow direct file download (hotlinking)?
// Empty - allow hotlinking
// If set to nonempty value (Example: example.com) will only allow downloads when referrer contains this text
define('ALLOWED_REFERRER''http://127.0.0.1/snews-jcart/download/');

// Download folder, i.e. folder where you keep all files for download.
// MUST end with slash (i.e. "/" )
define('BASE_DIR','C:\xampplite\htdocs\download\');


// log downloads?  true/false
define('
LOG_DOWNLOADS',true);

// log file name
define('
LOG_FILE','downloads.log');

// Allowed extensions list in format '
extension' => 'mime type'
// If myme type is set to empty string then script will try to detect mime type 
// itself, which would only work if you have Mimetype or Fileinfo extensions
// installed on server.
$allowed_ext = array (

  // archives
  '
zip' => 'application/zip',

  // documents
  '
pdf' => 'application/pdf',
  '
doc' => 'application/msword',
  '
xls' => 'application/vnd.ms-excel',
  '
ppt' => 'application/vnd.ms-powerpoint',
  
  // executables
  '
exe' => 'application/octet-stream',

  // images
  '
gif' => 'image/gif',
  '
png' => 'image/png',
  '
jpg' => 'image/jpeg',
  '
jpeg' => 'image/jpeg',

  // audio
  '
mp3' => 'audio/mpeg',
  '
wav' => 'audio/x-wav',

  // video
  '
mpeg' => 'video/mpeg',
  '
mpg' => 'video/mpeg',
  '
mpe' => 'video/mpeg',
  '
mov' => 'video/quicktime',
  '
avi' => 'video/x-msvideo'
);

$expire_in_hours = 72;  // how many hours before download expires, in hours

function download_is_expired($expire_time) {
    $today = time();
    if ($expire_time > $today) { return false; }
    else { return true; }
}

####################################################################
###  DO NOT CHANGE BELOW
####################################################################

// If hotlinking not allowed then make hackers think there are some server problems
if (ALLOWED_REFERRER !== ''
&& (!isset($_SERVER['
HTTP_REFERER']) || strpos(strtoupper($_SERVER['HTTP_REFERER']),strtoupper(ALLOWED_REFERRER)) === false)
) {
 // die("Internal server error. Please contact system administrator.");
session_destroy();
header("Location: http://127.0.0.1/snews-jcart/");
}

// Make sure program execution doesn'
t time out
// Set maximum script execution time in seconds (0 means no limit)
set_time_limit(6);

if (!isset(
$_GET['f']) || empty($_GET['f'])) {
  die(
"Please specify file name for download.");
}

// Nullbyte hack fix
if (strpos($_GET['f'], "\0") !== FALSE) die('');

// Get real file name.
// Remove any path info to avoid hacking by adding relative path, etc.
$fname basename($_GET['f']);

// Check if the file exists
// Check in subfolders too
function find_file ($dirname$fname, &$file_path) {

  
$dir opendir($dirname);

  while (
$file readdir($dir)) {
    if (empty(
$file_path) && $file != '.' && $file != '..') {
      if (
is_dir($dirname.'/'.$file)) {
        
find_file($dirname.'/'.$file$fname$file_path);
      }
      else {
        if (
file_exists($dirname.'/'.$fname)) {
          
$file_path $dirname.'/'.$fname;
          return;
        }
      }
    }
  }

// find_file

// get full file path (including subfolders)
$file_path '';
find_file(BASE_DIR$fname$file_path);

if (!
is_file($file_path)) {
  die(
"File does not exist. Make sure you specified correct file name."); 
}

// file size in bytes
$fsize filesize($file_path); 

// file extension
$fext strtolower(substr(strrchr($fname,"."),1));

// check if allowed extension
if (!array_key_exists($fext$allowed_ext)) {
  die(
"Not allowed file type."); 
}

// get mime type
if ($allowed_ext[$fext] == '') {
  
$mtype '';
  
// mime type is not set, get from server settings
  
if (function_exists('mime_content_type')) {
    
$mtype mime_content_type($file_path);
  }
  else if (
function_exists('finfo_file')) {
    
$finfo finfo_open(FILEINFO_MIME); // return mime type
    
$mtype finfo_file($finfo$file_path);
    
finfo_close($finfo);  
  }
  if (
$mtype == '') {
    
$mtype "application/force-download";
  }
}
else {
  
// get mime type defined by admin
  
$mtype $allowed_ext[$fext];
}

// Browser will try to save file with this filename, regardless original filename.
// You can override it if needed.

if (!isset($_GET['fc']) || empty($_GET['fc'])) {
  
$asfname $fname;
}
else {
  
// remove some bad chars
  
$asfname str_replace(array('"',"'",'\\','/'), ''$_GET['fc']);
  if (
$asfname === ''$asfname 'NoName';
}

// set headers
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public");
header("Content-Description: File Transfer");
header("Content-Type: $mtype");
header("Content-Disposition: attachment; filename=\"$asfname\"");
header("Content-Transfer-Encoding: binary");
header("Content-Length: " $fsize);

// download
// @readfile($file_path);
$file = @fopen($file_path,"rb");
if (
$file) {
  while(!
feof($file)) {
    print(
fread($file1024*8));
    
flush();
    if (
connection_status()!=0) {
      @
fclose($file);
      die();
    }
  }
  @
fclose($file);
}

// log downloads
if (!LOG_DOWNLOADS) die();

$f = @fopen(LOG_FILE'a+');
if (
$f) {
  @
fputs($fdate("m.d.Y g:ia")."  ".$_SERVER['REMOTE_ADDR']."  ".$fname."\n");
  @
fclose($f);
}

?>

modify the ALLOWED_REFERRER and BASE_DIR
in BASE_DIR upload the products
and you ready.

Working? YES!
http://dev.simply4all.net/snews-jcart/
Example test for two products
to download the [sNews CMS with Shopping Cart ] (is only zip with text file)
add
Username: test@gmail.com
File: 12345

Τo download the  [New Standard Template] (is only zip with text file)
Username: test2@gmail.com
File: 212345

this mod check how many times is download the product and if you exceeded the limit then you can't download it any more.

HELP needed
anything that you think is wrong
although I have include snews I don't check email, xss or I don't have put in form mathCaptcha etc..
can someone help with that?

Thanks
 :)
Title: Re: Shopping cart in sNews
Post by: stephane on July 10, 2012, 04:21:01 PM
Hi,
I'm trying yo add this mod. It seems working fine.
Do you know if it's possible to have it working (in Paypal) for postal delivery OR for download delivery, depending of the customer choice ?

I was wondering if it will be possible to add an Admin back office to create/Add/Change products ?

Thanks too you Sibas for this Mod.
Title: Re: Shopping cart in sNews
Post by: Lacquess on August 06, 2012, 11:11:57 AM
Been looking for a new theme package for sNews 1.7. Don't remember its name, though. Something called new standart or something. I think it used a standard blog layout, HTML5 and maybe other obscure features. Any ideas?
Title: Re: Shopping cart in sNews
Post by: sibas on August 07, 2012, 07:59:56 AM
See http://frdk.com/snews/templates/a-new-standard/
Or ask Fred K
Title: Re: Shopping cart in sNews
Post by: stephane on February 26, 2013, 07:19:38 PM
Hello Sibas,
Looks great. Everything seems working fine.

But I don't understand how the IPN script from Paypal work ?
And also how is generate the user name and file name to download ?

Thanks for your help if you can.
Stef
Title: Re: Shopping cart in sNews
Post by: sibas on March 01, 2013, 05:46:00 PM
Hi stephane
Unfortunately I have long time to use it and this mod is incomplete, the good stuff is that Iím going to need something similar and perhaps I found the time to finish, but not sure when this going to happen.

Now the script is simple the only thing is needed to make it work is to link with the IPN,
and the IPN with the download script (this needed to make it someone)

if you want to try the steps is the following

first see the install of jcart
http://conceptlogic.com/jcart/install.php

second in config see the // The URL of your PayPal IPN script

third try to generate the IPN file from
https://www.paypaltech.com/SG2/

then just simply when someone pays in paypal the IPN notifying you,
and redirect the user to the page where the download link exist (this is not fixed yet)

In other words the file to download already exists but the links are hidden.
The user name is not needed (I use it as example to test the downloads)

 :)
Title: Re: Shopping cart in sNews
Post by: sibas on March 01, 2013, 05:57:52 PM
forgot, is good to check IPN direct implementation from paypal (https://cms.paypal.com/uk/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_admin_IPNImplementation)
Title: Re: Shopping cart in sNews
Post by: stephane on March 01, 2013, 06:18:24 PM
Thank you Sibas,
Glad to see you around  :)
All the Jcart part works fine, it's really a great job.

The problem is this IPN stuff.
I tried different things but I can't "talk" with it. The problem is certainly  in my database ( I just copy/paste yours ;-)

then just simply when someone pays in paypal the IPN notifying you,
and redirect the user to the page where the download link exist (this is not fixed yet)

Here is the problem  :P

In other words the file to download already exists but the links are hidden.
The user name is not needed (I use it as example to test the downloads)

So if we have 10 products (for example) we have to make 10 different links to it ?
But if the buyer give this link to another person ?

Work in progress...
Thanks

A karma for the first part of this Mod
Another one when you finish it  ;D ;D
Title: Re: Shopping cart in sNews
Post by: sibas on March 01, 2013, 07:34:49 PM
If we talk for digitals goods then yes you must have it all in some place ready to download

So if we have 10 products (for example) we have to make 10 different links to it ?
But if the buyer give this link to another person ?

they are many ways to avoid this
the most simple (as I have check for a while) is

when someone pays in paypal the ipn returns the email of user
then user add his email to your page and starts the download
when you verify that the user have make the download you denny to download again from this specific email.

Hope you get the picture, but how I said is many ways..

Title: Re: Shopping cart in sNews
Post by: stephane on March 01, 2013, 07:44:15 PM
Yes I was talking for digitals products.

I will see this identification problem after the IPN  ;)

As soon as I have something new about it I'll let you know here.