Text Size
Welcome, Guest
Please Login or Register.    Lost Password?

Post here for jCart help
(1 viewing) (1) Guest
Go to bottomPage: 123
TOPIC: Post here for jCart help
#24
Re:Post here for jCart help 1 Year ago Karma: 0  
<strong>Bannta wrote:</strong>
I have in issue... the $items_query_string is showing up empty...and the same thing is happening on your example as well.


For this example we have PayPal off to avoid any accidental charge while tesing.
Once you add your merchant ID the Checkout With PayPal button will link on to that site.

PayPal integration requires a secure merchant ID. Please see the installation instructions for more info.
Below is the URL that would be sent to PayPal if a merchant ID was set in jcart-config.php:
www.paypal.com/cgi-bin/webscr?cmd=_cart&...p;business=PAYPAL_ID


should be getting that $items_query_string after the PAYPAL_ID even in test mode.

<code>echo 'www.paypal.com/cgi-bin/webscr?cmd=_cart&...ness=PAYPAL_ID' . $items_query_string;</code>


I found it:
jcart.php line 300ish
Code:


// OVERWRITE THE CONFIG FORM ACTION TO POST TO jcart-gateway.php INSTEAD OF POSTING BACK TO CHECKOUT PAGE
// THIS ALSO ALLOWS US TO VALIDATE PRICES BEFORE SENDING CART CONTENTS TO PAYPAL
if ($is_checkout == true)
{
// $form_action = $path . 'jcart-gateway.php';
// adjusted for Joomla
// find the domain:
$joomlaMenuURL = $_SERVER['HTTP_REFERER'];
if (isset($_GET['action'])) {   
$form_action = $joomlaMenuURL;
} else {
$form_action = $joomlaMenuURL."&action=gateway";
}
}



I remove the "adjusted for joomla" and pop it back to original code
Code:


// OVERWRITE THE CONFIG FORM ACTION TO POST TO jcart-gateway.php INSTEAD OF POSTING BACK TO CHECKOUT PAGE
// THIS ALSO ALLOWS US TO VALIDATE PRICES BEFORE SENDING CART CONTENTS TO PAYPAL
if ($is_checkout == true)
{
$form_action = $path . 'jcart-gateway.php';
}



Note: You guys can test your transaction in the paypal sandbox to give it a once over. just set up a test account and enable the setting.

// REDIRECT TO PAYPAL WITH MERCHANT ID AND CART CONTENTS
header( 'Location: www.sandbox.paypal.com/cgi-bin/webscr?cmd=_cart&upload=1&business=' . $jcart['paypal_id'] . $items_query_string);
exit;
Bannta (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#28
Re:Post here for jCart help 9 Months, 2 Weeks ago Karma: 0  
Hi
I have 2 issues
1. when I add at item it puts 2 of the item into the cart.
2. How do I change the shopping cart currency to Euros from Dollars? When the cart goes to paypal it values the cart in dollars rather than euros.

Thanks

website is www.chooselife.ie
jpm080456 (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#29
Re:Post here for jCart help 8 Months ago Karma: 0  
Hi,
I have a question related to Jcart. I have modified it. I added search but there is an error. Please waiting for solution.
the demo version: www.setaweb.biz/sub/tesa

I receive this error


Fatal error: Cannot use object of type jcart as array in **************/tesa/modules/mod_omb_jcart/jcart/jcart-config.php on line 46


The code:
Code:


<?php

// JCART v1.1
// http://conceptlogic.com/jcart/

///////////////////////////////////////////////////////////////////////
// REQUIRED SETTINGS
//$cart =& $_SESSION['jcart']; if(!is_object($cart)) $cart = new jcart();
// YOUR PAYPAL SECURE MERCHANT ACCOUNT ID
$jcart['paypal_id'] = '';

// THE HTML NAME ATTRIBUTES USED IN YOUR ADD-TO-CART FORM - These names will work fine.
$jcart['item_id'] = 'my-item-id'; // ITEM ID
$jcart['item_name'] = 'my-item-name'; // ITEM NAME
$jcart['item_price'] = 'my-item-price'; // ITEM PRICE
$jcart['item_qty'] = 'my-item-qty'; // ITEM QTY
$jcart['item_add'] = 'my-add-button'; // ADD-TO-CART BUTTON

// PATH TO THE DIRECTORY CONTAINING JCART FILES - Adjust if you do something crazy like put Joomla in a subdirectory
//$jcart['path'] = '/car/modules/mod_omb_jcart/jcart/';
$jcart['path'] = '/modules/mod_omb_jcart/jcart/';

// THE PATH AND FILENAME WHERE SHOPPING CART CONTENTS SHOULD BE POSTED WHEN A VISITOR CLICKS THE CHECKOUT BUTTON
// USED AS THE ACTION ATTRIBUTE FOR THE SHOPPING CART FORM

// find out the url path
$joomlaMenuURL = $_SERVER['HTTP_REFERER'];
$joomlaMenuURL = $joomlaMenuURL."index.php?option=com_content&view=article";
session_start();
$checkSEF = $_SESSION['jcart_sef'];
if (isset($_GET['action'])) {   
$theTotalURL = $joomlaMenuURL."&sef=".$checkSEF;
} else {
//echo "jcart_sef 2 = ". $_SESSION['jcart_sef'] . "<br />"; //retrieve data
// echo "relay 2: " . $sefValue . "<br />";
if($checkSEF == 1){
$theTotalURL = $joomlaMenuURL."/?action=checkout&sef=".$checkSEF;
  } else {
$theTotalURL = $joomlaMenuURL."&action=checkout&sef=".$checkSEF;
}
}
 //echo "theTotalURL: " . $theTotalURL . "<br />";

// jcart url embedded in the joomla string
//echo $joomlaMenuURL." - ".$theTotalURL;
$jcart['form_action'] = $theTotalURL; // Line 46

 // if your server is poopy then hardcode the url string...
// $jcart['form_action'] = "http://www.thumbdo.com/index.php?option=com_content&view=article&id=95&Itemid=133&action=checkout&jcart_is_checkout=true";



///////////////////////////////////////////////////////////////////////
// OPTIONAL SETTINGS

// OVERRIDE DEFAULT CART TEXT
$jcart['text']['cart_title'] = ''; // Shopping Cart
$jcart['text']['single_item'] = ''; // Item
$jcart['text']['multiple_items'] = ''; // Items
$jcart['text']['currency_symbol'] = ''; // $
$jcart['text']['subtotal'] = ''; // Subtotal

$jcart['text']['update_button'] = ''; // update
$jcart['text']['checkout_button'] = ''; // checkout
$jcart['text']['checkout_paypal_button'] = ''; // Checkout with PayPal
$jcart['text']['remove_link'] = ''; // remove
$jcart['text']['empty_button'] = ''; // empty
$jcart['text']['empty_message'] = ''; // Your cart is empty!
$jcart['text']['item_added_message'] = ''; // Item added!

$jcart['text']['price_error'] = ''; // Invalid price format!
$jcart['text']['quantity_error'] = ''; // Item quantities must be whole numbers!
$jcart['text']['checkout_error'] =''; // Your order could not be processed!

// OVERRIDE THE DEFAULT BUTTONS WITH YOUR IMAGES BY SETTING THE PATH FOR EACH IMAGE
$jcart['button']['checkout'] = '';
$jcart['button']['paypal_checkout'] = '';
$jcart['button']['update'] = '';
$jcart['button']['empty'] = '';

?>


immortality (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 123

Site Login