Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Ship 2 Pay v1.0 (MS1)


Guest

Recommended Posts

  • 1 month later...
  • Replies 61
  • Created
  • Last Reply

Top Posters In This Topic

push up....

 

 

Tri to check th installation once again, probably u have donesometingh wrong.

 

 

BTW i've got this little problem. I've used ship2pay without problem for almost one year. Now i've added a new payment options to my website, and here come the new problem... Ship 2 pay only allow me to see the second payment options, but ide the first one...

 

Anyone have a clue? What modify are needed to use two type of payment with one shipping options? THX

my contribution: Alex's Contributions

Link to comment
Share on other sites

I think that theproblem is in this function:

 

// class constructor
   function ship2pay() {
  global $language, $PHP_SELF,$shipment,$GLOBALS;
     $this->modules = array();
     $q_ship2pay = tep_db_query("SELECT shipment, payments_allowed FROM ".TABLE_SHIP2PAY." where status=1 ORDER BY payments_allowed DESC");
  while ($mods = tep_db_fetch_array($q_ship2pay)) {
	 //echo $mods['shipment'];
	 //echo $mods['payments_allowed'];
	 $this->modules[$mods['shipment']] = $mods['payments_allowed'];
     } 
}

 

the last string

$this->modules[$mods['shipment']] = $mods['payments_allowed'];

only memorize thelast shipping options, overwriting the first...

 

any idea? someone knows what "$this->" exactly do? thx for any int. Bye

my contribution: Alex's Contributions

Link to comment
Share on other sites

  • 2 months later...

Hi,

 

i got an error, after installing this contrib.

I changed und uploaded the files und executed the database.

After that, I went to the administration-area.

At 'modules' I found the link to ship2pay.

But if i enter the link (http://mydomain.de/shop/catalog/admin/ship2pay.php)

 

I get this error message:

"1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1

 

select s2p_id, shipment, payments_allowed, status from ship2pay limit -20, 20

 

[TEP STOP]"

 

unfortunately I am know nothing about the sql-syntax

 

The sql-file i executed looked like this:

 

CREATE TABLE `ship2pay` (

`s2p_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,

`shipment` VARCHAR( 100 ) NOT NULL ,

`payments_allowed` VARCHAR( 250 ) NOT NULL ,

`status` TINYINT NOT NULL

);

 

 

I hope somebody may help me.

 

 

so far

christian

Edited by christiankrischausky
Link to comment
Share on other sites

  • 4 weeks later...

I got a problem with ship2pay too.

 

This thing doesent work. Nothing seen in Admin Panel... fatal errors at payment.

 

Anybody make this ship2pay correct?

 

Regards

Link to comment
Share on other sites

  • 6 months later...
Tri to check th installation once again, probably u have donesometingh wrong.

BTW i've got this little problem. I've used ship2pay without problem for almost one year. Now i've added a new payment options to my website, and here come the new problem... Ship 2 pay only allow me to see the second payment options, but ide the first one...

 

All are OK, you should to have only one entry with ship modules in table and connect to this entry one or more payments module with key [CTRL] in one step.

Link to comment
Share on other sites

  • 1 month later...

Hi, Marcin.

I working in one country only, I have two modules of the shipping.

In Admin Panel I don't connect payment metod to the shipment. In the ship 2 pay module drop down menu of the shipping metod is empty.

Edited by Scully
Link to comment
Share on other sites

Hi, Marcin.

I working in one country only, I have two modules of the shipping.

In Admin Panel I don't connect payment metod to the shipment. In the ship 2 pay module drop down menu of the shipping metod is empty.

Check your version ship2pay (for the multimethod modules you need 2.01, for modules with 1 method, you need 1.5: each befor 2.0). I describe potencial problem in 2.01 version:

 

In the file: /catalog/admin/ship2pay.php find line like this (+-21):

 

$order->delivery['country']['id']=170000;

 

Country with ID=170000 should be working with all method of ship (check config in modules or in zones are if modules working with zones). If you prefer other country, you need change the number in this line, to your best country (the country should working with all method of ship).

 

Genereal: you need one country (realy or specjal/virtual). The country should working with all method of ship. The ID of the country shoul exist in the file /catalog/admin/ship2pay.php in line (+-21):

 

$order->delivery['country']['id']=170000;

 

You need this country i this line only to see the method of ship in drop down menu. Only for this place.

 

--

Marcin Gebus

Link to comment
Share on other sites

  • 3 weeks later...

Hello everybody!

 

I have a little problem. I installed the contribution and it works wonderfully! BUT I have a little problem...

 

I've also installed the Freeamount-contribution and they don't work so well together. I get the following error when the Freeamount i activated:

 

Fatal error: Call to a member function on a non-object in /home/wt234/public_html/catalog/includes/modules/shipping/freeamount.php on line 64

 

The code in shipping/freeamount.php is the following at these line (55-80):

 

// class methods
function quote($method = '') {
  global $order, $cart, $shipping_weight;

  $dest_country = $order->delivery['country']['id'];
  $currency = $order->info['currency'];
  $get_total = false;
  $get_weight = false;
  $cart_total = $cart->show_total();

	if (MODULE_SHIPPING_FREEAMOUNT_HIDE_SPECIALS == 'True') {
	  // 28-9-2005 Check for articles on special which should not get free shipment
	  // Adjust the cart total price for this
	  $total_specials = 0;
	  if ($cart->count_contents() > 0) {
		 $products = $cart->get_products();
		 for ($i=0, $n=sizeof($products); $i<$n; $i++) {
			if ($special_price = tep_get_products_special_price($products[$i]['id'])) {
			   $products_price = $special_price;
			   $total_specials += $products_price;
			}
		 }
	  }

	  $cart_total = $cart_total - $total_specials;
	}

 

I'm a rookey to php so I really can't say what's missing...

 

Thanx!

Link to comment
Share on other sites

It not working, drop down menu of the shipping metod is empty.

1. You need one specjal country.

2. _EACH_ method of ship must can calculate shipping cost for the specjal country. You must set _each_ method of ship, to can calculate. Setting are depending for the method.

3. ID of specjal country you should write in the file:

 

/catalog/admin/ship2pay.php find line like this (+-21):

 

$order->delivery['country']['id']=170000;

 

--------------------------------------------------------------------------------------

I prepare the specjal country ZZ, you can prepare the same country or can use other country. The good solution are Antarctica.

 

--------------------------------------------------------------------------------------

You can see in drop down menu only ship-method, which can calculate cost of ship for the country defined in file:

 

/catalog/admin/ship2pay.php find line like this (+-21):

 

$order->delivery['country']['id']=170000;

 

--

MG

Link to comment
Share on other sites

I've also installed the Freeamount-contribution and they don't work so well together. I get the following error when the Freeamount i activated:

 

Fatal error: Call to a member function on a non-object in /home/wt234/public_html/catalog/includes/modules/shipping/freeamount.php on line 64

 

 

I've got the same problem. But I only got this when I put the shipping methode on price instead of weight

 

Any solutions?

Link to comment
Share on other sites

Hi everyone,

 

I'm also experiencing this problem. :)

 

When clicking on the 'Ship 2 Pay' link from the Administration menu, I receive the following error:

 

Fatal error: Call to a member function on a non-object in /home/xxxx/public_html/includes/classes/shipping.php on line 20

 

Shipping.php reads as follows:

 

  class shipping {
var $modules;

// class constructor
function shipping($module = '') {
  global $language, $PHP_SELF, $cart;
  // BOF: Individual Shipping Prices
  $products  = $cart->get_products();
  $shiptotal = $this->get_shiptotal();
  $indvcount = $this->get_indvcount();
  // EOF: Individual Shipping Prices

  if (defined('MODULE_SHIPPING_INSTALLED') && tep_not_null(MODULE_SHIPPING_INSTALLED)) {
	$this->modules = explode(';', MODULE_SHIPPING_INSTALLED);

 

The only customisation here is for the 'individual shipping prices' contribution, but how could this conflict with Ship2Pay?

 

I'd greatly appreciate any ideas you may have, as this looks like a really useful contribution, and so far as I can tell I've completed the basic install steps correctly.

Link to comment
Share on other sites

  • 2 weeks later...

This is a very nice contrib but the shipment selection doesn't work in all casus. The old version V1.5 does.

 

I my case the Ship2Pay doesn't show TPG Post (dutch shipment methode). This problem has been noted by others on the dutch forums of osCommerce so it's not something I did wrong.

 

This code who responceble for this is: admin/includes/classes/shipping

 

// class constructor

function shipping_s2p() {

global $shipping_classes, $quotes;

for ($i=0, $n=sizeof($quotes); $i<$n; $i++) {

for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) {

$this->modules[] = array('class' => $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'],

'file' => $quotes[$i]['id'] . '.php');

}

}

}

 

I hope you can resolve the problem with this info.

Link to comment
Share on other sites

  • 11 months later...
I've got the same problem. But I only got this when I put the shipping methode on price instead of weight

 

Any solutions?

I also have exactly the same problem.

 

Fatal error: Call to a member function show_total() on a non-object in C:\Program Files\xampp\htdocs\catalog\includes\modules\shipping\table.php on line 52

I've installed Ship2Pay version 2.01.

 

This is the code including line 52:

 

function quote($method = '') {
     global $order, $cart, $shipping_weight, $shipping_num_boxes;

     if (MODULE_SHIPPING_TABLE_MODE == 'price') {
       $order_total = $cart->show_total();
     } else {
       $order_total = $shipping_weight;
     }

Have anyone found the answer for this problem?

Link to comment
Share on other sites

  • 3 weeks later...

I have the same problem... Any ideas?

 

Hi everyone,

 

I'm also experiencing this problem. :)

 

When clicking on the 'Ship 2 Pay' link from the Administration menu, I receive the following error:

Shipping.php reads as follows:

 

  class shipping {
var $modules;

// class constructor
function shipping($module = '') {
  global $language, $PHP_SELF, $cart;
  // BOF: Individual Shipping Prices
  $products  = $cart->get_products();
  $shiptotal = $this->get_shiptotal();
  $indvcount = $this->get_indvcount();
  // EOF: Individual Shipping Prices

  if (defined('MODULE_SHIPPING_INSTALLED') && tep_not_null(MODULE_SHIPPING_INSTALLED)) {
	$this->modules = explode(';', MODULE_SHIPPING_INSTALLED);

 

The only customisation here is for the 'individual shipping prices' contribution, but how could this conflict with Ship2Pay?

 

I'd greatly appreciate any ideas you may have, as this looks like a really useful contribution, and so far as I can tell I've completed the basic install steps correctly.

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • 1 month later...
I get this error message:

<span style='color:red'>

"1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1

 

select s2p_id, shipment, payments_allowed, status from ship2pay limit -20, 20

 

[TEP STOP]"

</span>

 

The sql-file i executed looked like this:

 

CREATE TABLE `ship2pay` (

`s2p_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,

`shipment` VARCHAR( 100 ) NOT NULL ,

`payments_allowed` VARCHAR( 250 ) NOT NULL ,

`status` TINYINT NOT NULL

);

 

 

I have the same problem.

I just can't seem to find the problem.

Can anybody help me?

 

thnx stefan

Link to comment
Share on other sites

Problem:

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1

 

Solution:

Line 67 in catalog/includes/classes/split_page_results.php must be changed from:

 

$this->sql_query .= " limit " . $offset . ", " . $this->number_of_rows_per_page;

 

to:

 

$this->sql_query .= " limit " . max($offset, 0) . ", " . $this->number_of_rows_per_page;

 

Line 38 in catalog/admin/includes/classes/split_page_results.php must be changed from:

$sql_query .= " limit " . $offset . ", " . $max_rows_per_page;

 

to:

 

$sql_query .= " limit " . max($offset, 0) . ", " . $max_rows_per_page;

Link to comment
Share on other sites

  • 2 months later...
Problem:

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1

 

Solution:

Line 67 in catalog/includes/classes/split_page_results.php must be changed from:

 

$this->sql_query .= " limit " . $offset . ", " . $this->number_of_rows_per_page;

 

to:

 

$this->sql_query .= " limit " . max($offset, 0) . ", " . $this->number_of_rows_per_page;

 

Line 38 in catalog/admin/includes/classes/split_page_results.php must be changed from:

$sql_query .= " limit " . $offset . ", " . $max_rows_per_page;

 

to:

 

$sql_query .= " limit " . max($offset, 0) . ", " . $max_rows_per_page;

TOP!!!

"My name is Ass, Dumb Ass"

Link to comment
Share on other sites

  • 1 month later...

Hi guys... I've problem whit this module...

 

I've two web spaces, one with php-nuke and oscommerce and the other with only oscommerce...

 

In that with only oscommerce everything worked perfectly but the other gives me a problem...

 

then... In my site with portal php-nuke I can see link for ship2pay only that if I click over there I see a white page and there is nothing...

 

 

I don't understand why :'(

 

 

Can you help me? :blush:

 

 

 

Sorry if English isn't so correct

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...