Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multi_Vendor_Shipping new thread


blucollarguy

Recommended Posts

I feel so stupid, I thought I had my above problem fixed but I was wrong. I can ship with a 0 weight product and a weighted product together just fine. I can ship with a weight product just fine, but I can not ship with a 0 weight product. It will not redirect me to the checkout_payment page has anyone got MVS 1.1 working with PayPal Website Payments Pro contribution installed? The code overlaps with MVS code and I just can't seem to make it work right. I did post my code in my above post. I just can't find my error.

Link to comment
Share on other sites

So i tried to run through the install and now I get this in my shopping cart:

 

1146 - Table 'cyclsig3_credb.TABLE_VENDORS' doesn't exist

 

select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_weight, p.products_tax_class_id, v.vendors_id, v.vendors_name from products p, products_description pd, TABLE_VENDORS v where p.products_id = '50' and pd.products_id = p.products_id and v.vendors_id = p.vendors_id and pd.language_id = '1'

 

 

What did I miss? :blink:

Link to comment
Share on other sites

So i tried to run through the install and now I get this in my shopping cart:

 

1146 - Table 'cyclsig3_credb.TABLE_VENDORS' doesn't exist

 

select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_weight, p.products_tax_class_id, v.vendors_id, v.vendors_name from products p, products_description pd, TABLE_VENDORS v where p.products_id = '50' and pd.products_id = p.products_id and v.vendors_id = p.vendors_id and pd.language_id = '1'

What did I miss? :blink:

The changes to includes/database_tables.php, apparently.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Is that not included in the install?

 

How do I make those changes?

Yes that's part of the install. It appears that you did not make those changes, although it could be something else. The instructions are in the admin_install.txt and catalog_install.txt files. Also, did you run the mvs.sql?

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

I *think* I got my PayPal Sandbox stuff all set up and started to do a test purchase in my store.

 

I put in about 7 items into the cart (representing 7 different vendors). I click on check out and got the following error:

 

Parse error: parse error, unexpected '<' in /home/moonligh/public_html/catalog/checkout_shipping.php on line 60

 

So, I'm in that file and thought perhaps the //MVS start was in the wrong spot *shrugs* I have no clue, so I changed it. Makes no difference. So, here's the code surrounding Line 60 - can anyone spot an error?

 

// if the order contains only virtual products, forward the customer to the billing page as
// a shipping address is not needed
 if ($order->content_type == 'virtual') {
if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
$shipping = false;
$sendto = false;
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
 }

//MVS start
 <?php

 if (tep_count_shipping_modules() > 0 || SELECT_VENDOR_SHIPPING == 'true') {
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		 <td class="main"><b><?php echo TABLE_HEADING_SHIPPING_METHOD; ?></b></td>
	  </tr>
	</table></td>
  </tr>
<?php
 if (SELECT_VENDOR_SHIPPING == 'true') {
include(DIR_WS_CLASSES . 'vendor_shipping.php');
$shipping_modules = new shipping;
 } else {
include(DIR_WS_CLASSES . 'shipping.php');

 

Can anyone spot an error, or do you need the full file code?

 

Thanks

Link to comment
Share on other sites

I *think* I got my PayPal Sandbox stuff all set up and started to do a test purchase in my store.

 

I put in about 7 items into the cart (representing 7 different vendors). I click on check out and got the following error:

 

Parse error: parse error, unexpected '<' in /home/moonligh/public_html/catalog/checkout_shipping.php on line 60

 

So, I'm in that file and thought perhaps the //MVS start was in the wrong spot *shrugs* I have no clue, so I changed it. Makes no difference. So, here's the code surrounding Line 60 - can anyone spot an error?

 

// if the order contains only virtual products, forward the customer to the billing page as
// a shipping address is not needed
 if ($order->content_type == 'virtual') {
if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
$shipping = false;
$sendto = false;
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
 }

//MVS start
 <?php

 if (tep_count_shipping_modules() > 0 || SELECT_VENDOR_SHIPPING == 'true') {
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		 <td class="main"><b><?php echo TABLE_HEADING_SHIPPING_METHOD; ?></b></td>
	  </tr>
	</table></td>
  </tr>
<?php
 if (SELECT_VENDOR_SHIPPING == 'true') {
include(DIR_WS_CLASSES . 'vendor_shipping.php');
$shipping_modules = new shipping;
 } else {
include(DIR_WS_CLASSES . 'shipping.php');

 

Can anyone spot an error, or do you need the full file code?

 

Thanks

//MVS start
 <?php

Get rid of the

<?php

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

So i tried to install this, it didn't go well, i tried to roll back, and that's not going well either.

 

I get an error when the checkout_shipping.php loads up

 

1109 - Unknown table 'p' in where clause

 

select products_id, products_image, products_tax_class_id, products_price from products where DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= p.products_date_added and products_status = '1' order by products_date_added desc limit 10

 

is there a quick and dirty way to roll back to the default? I tried to just replace the file with the original but that doesn't seem to help. Not sure how it got messed up, I rollled the DB back to original too.

 

thanks in advance

Link to comment
Share on other sites

So i tried to install this, it didn't go well, i tried to roll back, and that's not going well either.

 

I get an error when the checkout_shipping.php loads up

 

1109 - Unknown table 'p' in where clause

 

select products_id, products_image, products_tax_class_id, products_price from products where DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= p.products_date_added and products_status = '1' order by products_date_added desc limit 10

 

is there a quick and dirty way to roll back to the default? I tried to just replace the file with the original but that doesn't seem to help. Not sure how it got messed up, I rollled the DB back to original too.

 

thanks in advance

Replacing all of the files and restoring the database should work. Apparently the files that you went back to have been changed. In this case, replace p.products_date_added with products_date_added.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Thank you Jim for helping with the previous code. I am still wrapping my brain around PHP.

 

I fixed that one and then immediately got another error:

 

Parse error: parse error, unexpected '}' in /home/moonligh/public_html/catalog/checkout_shipping.php on line 182

 

I took out the }, but then got an error along the lines of T_xxx (don't remember exactly) concerning that same line.

 

So, here's the got surrounding Line 182......

 

   } else {
	tep_session_unregister('shipping');
  }
}
tep_redirect(tep_href_link('checkout_payment.php', '', 'SSL'));
exit;
 }  //MVS END

	} else {
	  tep_session_unregister('shipping');

 } 
} else {
  $shipping = false;

  tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
}	
 }

// get all available shipping quotes
 $quotes = $shipping_modules->quote();

 

I took out the } that is by itself above the shipping=false code and that is when it gave me the other T_xxx error. Line 182 is the } else { code there.

Link to comment
Share on other sites

Thank you Jim for helping with the previous code. I am still wrapping my brain around PHP.

 

I fixed that one and then immediately got another error:

 

Parse error: parse error, unexpected '}' in /home/moonligh/public_html/catalog/checkout_shipping.php on line 182

 

I took out the }, but then got an error along the lines of T_xxx (don't remember exactly) concerning that same line.

 

So, here's the got surrounding Line 182......

 

   } else {
	tep_session_unregister('shipping');
  }
}
tep_redirect(tep_href_link('checkout_payment.php', '', 'SSL'));
exit;
 }  //MVS END

	} else {
	  tep_session_unregister('shipping');

 } 
} else {
  $shipping = false;

  tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
}	
 }

// get all available shipping quotes
 $quotes = $shipping_modules->quote();

 

I took out the } that is by itself above the shipping=false code and that is when it gave me the other T_xxx error. Line 182 is the } else { code there.

I can't be certain from looking at that, but if your code is stock MVS then remove all of this part:

		 
	} else {
	  tep_session_unregister('shipping');

 } 
} else {
  $shipping = false;

  tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
}	
 }

That appears to be duplicate lines. If you patched this file yourself, you may not have deleted the correct parts of the old code. This could be tricky to fix. Do you have a lot of changes other than MVS in this page?

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Replacing all of the files and restoring the database should work. Apparently the files that you went back to have been changed. In this case, replace p.products_date_added with products_date_added.

 

Regards

Jim

 

 

thanks!!

 

I looked in the shopping_cart.php file but I don't see the p.products_data_added

 

Should I be looking in a different file?

 

thanks in advance,

 

Jon

Link to comment
Share on other sites

I've asked three or four questions in this topic and no one has replied at all!

 

Are my questions just so stupid that I am being ignored or what?

You answered yourself in the most recent question that you asked. The one previous to that seems to have something to do with an anti-cheat feature of MVS. I don't really understand your question, and I wrote that code.

 

If somebody doesn't answer your question, it's likely that we just didn't understand what you are asking. Try giving us more information about the problem, and maybe some steps that you have taken to solve it. You're more likely to get an answer that way.

 

It could also have something to do with this board being incredibly slow . It's taking me forever just to try to answer questions.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

thanks!!

 

I looked in the shopping_cart.php file but I don't see the p.products_data_added

 

Should I be looking in a different file?

 

thanks in advance,

 

Jon

It could be in the shopping cart class file as well (includes/classes/shopping_cart.php) You could try searching for that, but be careful -- that form is required in some SQL statements. Look for other column names preceded by one or more letters and a dot. If that form is used throughout, then it should stay that way. If the statement just contains column names without the prefix characters and dot, then all should be that way as well.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

It could be in the shopping cart class file as well (includes/classes/shopping_cart.php) You could try searching for that, but be careful -- that form is required in some SQL statements. Look for other column names preceded by one or more letters and a dot. If that form is used throughout, then it should stay that way. If the statement just contains column names without the prefix characters and dot, then all should be that way as well.

 

Regards

Jim

 

I'm really confused because now that I look at what I did all I installed was the individual shipping portion of MVS and not actually MVS by accident. All this should have done is create on line in my DB and replace a few files, one of them being my shopping cart..which i've since rolled back to what i thought was original but obviously isn't. This is highly confusing. :angry:

Link to comment
Share on other sites

Alright, cool. Thanks for the reply, Jim.

 

-First question:

If a customer is going through the checkout pages with an order, gets to the confirmation page but then decides to change their shipping preference before confirming, the shipping preferences is cleared on the checkout_shipping page. This is unlike the checkout_payment page for if you go back to that page, your previously selected payment method is still selected. I see that this is also true with Craig's demo shopping cart so it is not just my copy.

 

-Second Question:

If a customer is checking out multiple products from more than one vendor, the JavaScript that highlights the different shipping methods doesn't work independently with each vendor. Instead, when one shipping method is selected from one vendor, your other highlighted shipping methods are cleared. In addition, you cannot click in the highlighted area to select the shipping method. You are forced to actually click on the radio button to select it, even when your selection is highlighted. That may confuse some people as it looks like their shipping method was selected when it really wasn't. This is also true in Craig's shopping cart demo. For now, I've disabled the JavaScript that highlights the shipping methods. Has anyone else found a fix for this bug?

 

 

Third and last question (and I don't expect anyone to answer this one as it doesn't necessarily apply to this contribution but I thought I might as well try):

I am currently optimizing my shopping cart website with FedEx (and then eventually UPS). I've gotten the quotes from FedEx to work just fine using the vendor_shipping module fedex1.php with my products' weight attribute. However, because most of my products require what FedEx considers oversized boxes, I NEED to also send LxWxH information to FedEx (this will true for UPS as well) to receive accurate shipping quotes.

Has anyone done this yet or does anyone know of a contribution which adds a length x width x height attribute to catalog products which the fedex1.php shipping module can then take and send to FedEx?

 

Thanks so much,

Scott

Link to comment
Share on other sites

I'm really confused because now that I look at what I did all I installed was the individual shipping portion of MVS and not actually MVS by accident. All this should have done is create on line in my DB and replace a few files, one of them being my shopping cart..which i've since rolled back to what i thought was original but obviously isn't. This is highly confusing. :angry:

That's why we always tell everyone to make a backup before installing anything new. You'll need to identify your changes and back them out, or you can start over with a clean copy of each file and reapply the changes. If there are only a few files this should not take you too long.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Ok, I have been pluging away at my virtual product problem. However, I am not out of the woods yet! As I said in my previous post I am able to ship weighted and non-weighted products together just fine. I am able to ship weighted product just fine. But I can not ship non-weighted products by themselves. As I stated above when I tried to go to checkout, it would give me "page can not be displayed". Now, it takes me to the checkout_shipping page. And in the select Shipping method box it says:

 

*************

Products

My Love/MP3 sample/Download

 

 

This is currently the only shipping method available to use on this order.

United Parcel Service

We are unable to obtain a rate quote for UPS shipping.

Please contact the store if no other alternative is shown.

 

************* **

This should say "Free shipping only" and give a $0.00 And then let me contiue to the Payment page.

 

Instead, If I click continue from here it will give me ERROR_NO_SHIPPING_SELECTED_SELECTED .

 

How I was able to get to this was I commented out line 68 in my catalog/checkout_shipping.php

 

// tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

 

 

This is the complete section of code:

 

// if the order contains only virtual products, forward the customer to the billing page as

// a shipping address is not needed

// ###### Added CCGV Contribution #########

// if ($order->content_type == 'virtual') {

if (($order->content_type == 'virtual') || ($order->content_type == 'virtual_weight') ) {

// ###### End Added CCGV Contribution #########

if (!tep_session_is_registered('shipping')) tep_session_register('shipping');

$shipping = false;

$sendto = false;

// tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); /////// COMMENTED LINE

}

 

//MVS

if (SELECT_VENDOR_SHIPPING == 'true') {

include(DIR_WS_CLASSES . 'vendor_shipping.php');

$shipping_modules = new shipping;

} else {

include(DIR_WS_CLASSES . 'shipping.php');

$shipping_modules = new shipping;

$total_weight = $cart->show_weight();

$cost = $cart->show_total();

$total_count = $cart->count_contents();

}

 

 

I have not found why it is calling for a shipping method other then the free shipping only. If I turn off MVS all works great on all above product methods.

Link to comment
Share on other sites

Alright, cool. Thanks for the reply, Jim.

 

-First question:

If a customer is going through the checkout pages with an order, gets to the confirmation page but then decides to change their shipping preference before confirming, the shipping preferences is cleared on the checkout_shipping page. This is unlike the checkout_payment page for if you go back to that page, your previously selected payment method is still selected. I see that this is also true with Craig's demo shopping cart so it is not just my copy.

The shipping selections are not being deliberately cleared, rather the data is not being passed back. We'll add this one to the wish list.

-Second Question:

If a customer is checking out multiple products from more than one vendor, the JavaScript that highlights the different shipping methods doesn't work independently with each vendor. Instead, when one shipping method is selected from one vendor, your other highlighted shipping methods are cleared. In addition, you cannot click in the highlighted area to select the shipping method. You are forced to actually click on the radio button to select it, even when your selection is highlighted. That may confuse some people as it looks like their shipping method was selected when it really wasn't. This is also true in Craig's shopping cart demo. For now, I've disabled the JavaScript that highlights the shipping methods. Has anyone else found a fix for this bug?

That is a known bug. I've attempted a fix without success. Unfortunately my knowledge of Javascript is not very complete. My code looks to me like it should work, but it fails completely. This one will need to wait for a Javascript programmer who knows how to do this.

Third and last question (and I don't expect anyone to answer this one as it doesn't necessarily apply to this contribution but I thought I might as well try):

I am currently optimizing my shopping cart website with FedEx (and then eventually UPS). I've gotten the quotes from FedEx to work just fine using the vendor_shipping module fedex1.php with my products' weight attribute. However, because most of my products require what FedEx considers oversized boxes, I NEED to also send LxWxH information to FedEx (this will true for UPS as well) to receive accurate shipping quotes.

Has anyone done this yet or does anyone know of a contribution which adds a length x width x height attribute to catalog products which the fedex1.php shipping module can then take and send to FedEx?

 

Thanks so much,

Scott

I don't have a solution to this one, but I can suggest a workaround: Increase the weight of your products to make up for the oversize penalty. I don't know exactly how FedEx calculates their charges, but UPS just charges you for a heavier package, and I suspect that it's similar. Perhaps the FedEx rate book would divulge this information.

 

It should also be possible to modify the FedEx module to send this information, so long as you add dimensional information to the database. This would take a fair amount of work. You might post a question in the modules forum to see if anybody has done this.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

// tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); /////// COMMENTED LINE

This line is what sends customers directly to the payment page when they have only virtual products. Commenting it out will cause the problems you are seeing. I suspect that you have another error somewhere else as well, but I don't see anything wrong with the code you have shown..

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Barbara

 

I'm seeing this at the top of your shipping page:

		<tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		 <td class="main"><b>TABLE_HEADING_SHIPPING_METHOD</b></td>
	  </tr>
	</table></td>
  </tr>

I suspect that you pasted that much too high up on the page. It's the part that starts with

<?php
//MVS start
 if (tep_count_shipping_modules() > 0 || SELECT_VENDOR_SHIPPING == 'true') {
?>

then the part that I started with and more. That should start at Line 279 on an unmodified copy. Moving that down to the correct location will solve some of your problems.

 

UPS is a pain. Make certain that all of your settings are correct. A typo in any of the module fields will break it, as will an invalid zip code in the vendor info. If you still can't figure it out, find this at line 353 in ups.php:

/*
mail('[email protected]','UPS response',$body,'From: <[email protected]>');
*/

Uncomment that and change the email addresses to yours. That will mail you the raw UPS response. If you don't understand it then post the information here and we'll look at it.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Jim

I'm seeing this at the top of your shipping page:

		<tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		 <td class="main"><b>TABLE_HEADING_SHIPPING_METHOD</b></td>
	  </tr>
	</table></td>
  </tr>

 

This isn't at the top of my checkout_shipping.php page. Hmmmmmm

 

I suspect that you pasted that much too high up on the page. It's the part that starts with

<?php
//MVS start
 if (tep_count_shipping_modules() > 0 || SELECT_VENDOR_SHIPPING == 'true') {
?>

 

The above code is where the Catalog Install instructions said to be: Look for lines 58-135 and replace with the code that starts with the above. And that's where I put it.

 

Would it help if I posted the 530 lines of my catalog/checkout_shipping.php? As far as I know, the MVS contribution is the only modification I've made to this file. The only other contributions I've done to the site thus far is Header Tags Controller and Shadowbox effect.

 

I've gone over the install instructions several times now and don't see any mistakes on my part. I'm not perfect, but I just am not seeing what went wrong. *pouts* *grins*

Link to comment
Share on other sites

The Catalog Install instructions for checkout_shipping.php states:

 

======================
Find Lines 58 thru 135
======================

 $total_weight = $cart->show_weight();
 $total_count = $cart->count_contents();

// load all enabled shipping modules
 require(DIR_WS_CLASSES . 'shipping.php');
 $shipping_modules = new shipping;

 if ( defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING') && (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') ) {
$pass = false;

switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {
  case 'national':
	if ($order->delivery['country_id'] == STORE_COUNTRY) {
	  $pass = true;
	}
	break;
  case 'international':
	if ($order->delivery['country_id'] != STORE_COUNTRY) {
	  $pass = true;
	}
	break;
  case 'both':
	$pass = true;
	break;
}  etc etc

 

=============
Replace With
=============

<?php
//MVS start
 if (tep_count_shipping_modules() > 0 || SELECT_VENDOR_SHIPPING == 'true') {
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		 <td class="main"><b><?php echo TABLE_HEADING_SHIPPING_METHOD; ?></b></td>
	  </tr>
	</table></td>
  </tr>
<?php
 if (SELECT_VENDOR_SHIPPING == 'true') {
include(DIR_WS_CLASSES . 'vendor_shipping.php');
$shipping_modules = new shipping;
 } else {
include(DIR_WS_CLASSES . 'shipping.php');
$shipping_modules = new shipping;
$total_weight = $cart->show_weight();
$cost = $cart->show_total();
$total_count = $cart->count_contents();
 } etc etc

 

So that Table_Heading_Shipping_Method code would be towards the top of my coding. Is this not 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...