Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Ship In Cart


Guest

Recommended Posts

Hi there

 

I have Ship in cart 2.2.2.a installed (for a couple of years) and all is working fine except i think it would be better if the county/state changed when the country was changed and of course the postage price and cart with out having to press the update button at every stage, I had a look through and cant see this discussed, has anybody have this working like this and do they know what the fix was

 

thank you

David

Link to comment
Share on other sites

  • 2 months later...

Hi Guys

 

I am using Ship In Cart v2.2.2a+product info with OSC rca2.2

 

I have some prob with the Product info page.

 

Problem 1: For user that not log in, i have enabled the state selector option and the shown "update" button option.

The prob is when a state is selected and update button hit the url will come to something like: "wwww.xxx/catalog/_", and no such address page will be shown.

 

Problem 2: If user log in with more than an address to be selected, the update button doesn't shown and i can't refresh it after selecting one of the address in the profile.

 

 

Anyone facing the same prob and got the solution??

 

Many thanks

 

 

Hi Folks and days2,

 

first of all thanks to days2 for saving me some time on typing, since I am having exactly the same errors on MS 2.2 rc2a.

Hours of searching made me assume that it has got something to do with either the </form> not being included or the form itself being placed in the wrong place.

Whatever I tried did not work. I also tried this solution but am not sure I understood what pvallen wants to say.

 

Me personally I suspect it could have something to do with

<a href="_" onclick="return shipincart_submit(\'\');">

 

I made a .pdf with colored HTML and line numbers of my shopping_cart.php, shipping_estimator.php and product_shipping_estimator.pdf hoping somebody can help me.

 

Thank you very much

Nala

Link to comment
Share on other sites

  • 4 weeks later...
  • 3 months later...

Hi there,

 

I haven't trawled every page in this thread but wanted to post an update for all of those who have experienced an error on the product page whereby anyone clicking on the "update cart" button gets an error of page cannot be dispayed and the url appears something like http://www.xyzdomain.com/_.

 

To correct this find:

 

<tr>
<td>
<br>
<?php
$cart->add_cart($product_info['products_id']); //add current to cart for estimator
if (CARTSHIP_ONOFF == 'Enabled') { require(DIR_WS_MODULES . 'product_shipping_estimator.php'); } else {};
$cart->remove($product_info['products_id']);   //lets remove current product from cart
?>
</td>
</tr>

 

and add </form> just before it so that the code looks something like:

 

</form>
<tr>
<td>
<br>
<?php
$cart->add_cart($product_info['products_id']); //add current to cart for estimator
if (CARTSHIP_ONOFF == 'Enabled') { require(DIR_WS_MODULES . 'product_shipping_estimator.php'); } else {};
$cart->remove($product_info['products_id']);   //lets remove current product from cart
?>
</td>
</tr>

 

I hope this helps someone - It worked for me and the module works well, so thanks to those for developing it.

 

Paul.

You will never learn if you don't try. And boy am I trying....!

Link to comment
Share on other sites

  • 2 months later...

anyone's able to modify code so it get rid of qty 1 rather than entire product within same product_id?

 

$cart->remove($product_info['products_id']); //lets remove current product from cart

Link to comment
Share on other sites

Hi there,

 

I haven't trawled every page in this thread but wanted to post an update for all of those who have experienced an error on the product page whereby anyone clicking on the "update cart" button gets an error of page cannot be dispayed and the url appears something like http://www.xyzdomain.com/_.

 

To correct this find:

 

<tr>
<td>
<br>
<?php
$cart->add_cart($product_info['products_id']); //add current to cart for estimator
if (CARTSHIP_ONOFF == 'Enabled') { require(DIR_WS_MODULES . 'product_shipping_estimator.php'); } else {};
$cart->remove($product_info['products_id']);   //lets remove current product from cart
?>
</td>
</tr>

 

and add </form> just before it so that the code looks something like:

 

</form>
<tr>
<td>
<br>
<?php
$cart->add_cart($product_info['products_id']); //add current to cart for estimator
if (CARTSHIP_ONOFF == 'Enabled') { require(DIR_WS_MODULES . 'product_shipping_estimator.php'); } else {};
$cart->remove($product_info['products_id']);   //lets remove current product from cart
?>
</td>
</tr>

 

I hope this helps someone - It worked for me and the module works well, so thanks to those for developing it.

 

Paul.

 

Thank you thank you.....that solved the problem (at least for me)

Link to comment
Share on other sites

  • 4 weeks later...

Hey everyone... I've had ship in cart installed for some time... everything has been working perfectly. However (there's always a however)... I recently installed SPPC and I'm now using table rates exclusivly for my wholesale customers.

 

The issue is; table rates are always showing when customers are "not" logged in (I presume because it does not require a postal code)... and because my wholesale customer have different shipping rates I need to hide this.

 

There is no "if" statement in the shipping_estimator.php for sppc customer groups and it doesn't use classes/shipping.php.

 

I've been trying to figure something out however my php skills are very lacking. Is there anybody out there who has an issue like this?

Link to comment
Share on other sites

Well I figured it out.... For anyone who is interterested... I added the following code to each shipping module that I did not want to display for customer group 0

 

 // BOF Exclude customer group 0 from Shipping estimator...sb
 global $customer_id;
   if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') {
   $customer_group_id = $_SESSION['sppc_customer_group_id'];
 } else {
   $customer_group_id = '0';
$this->enabled = false;
	  }
// EOF BOF Exclude from Shipping estimator...sb

Link to comment
Share on other sites

  • 1 year later...

Today I noticed something on my localhost that does not appear in my live site, I get this errormessage in the shopping cart:

 

Warning: Creating default object from empty value in C:\-----\includes\modules\shipping_estimator.php on line 82

 

Anyone knows why this has appeared? I have compared this file with the one on the live site, and they are identical..

Link to comment
Share on other sites

  • 1 year later...
  • 2 months later...

Hello,

 

Nice Contrib!

i have a problem with this contrib.

When i add first time a product everything works find. But when i update the cart to items 2x or add any other product no shipping costs were displayed.

 

http://www.rubberfashion.de/shopping_cart.php

 

I use Contrib visible contries. i have no clou why this happend.

 

Thanks for help.

 

Kind Regards

David

post-336108-0-18203200-1435638456_thumb.png

Edited by rubberfashion
Link to comment
Share on other sites

Hello,

 

Nice Contrib!

i have a problem with this contrib.

When i add first time a product everything works find. But when i update the cart to items 2x or add any other product no shipping costs were displayed.

 

http://www.rubberfashion.de/shopping_cart.php

 

I use Contrib visible contries. i have no clou why this happend.

 

Thanks for help.

 

Kind Regards

David

 

What i find out currently is that the array $quotes = $shipping_modules->quote(); is empty.

tep_count_shipping_modules() is 0. Means that the shipping module is not loaded.

Also only push the update (quantity) button make $quotes to 0.

Thats why the output is like it is.But i do not know how to solve.

Edited by rubberfashion
Link to comment
Share on other sites

Hello Dave @@rubberfashion,

 

I tried on my teststore and another real store and all works correct there.

Please see yourself:

http://www.sarfotostock.com/osCommerce234bs/shopping_cart.php

 

I thought first that the problem is that you have only one shipping module installed, but it works in my test store also with only the same module installed which you are using.

 

Please try the following:

Add a second shipping module and try.

 

Another subject: which php version are you running??

 

Kindest regards

Rainer

Link to comment
Share on other sites

PHP 5.4.41-1~he.0 (Zend: 2.4.0)

 

I have installed these modules.

What is curious is, taht the first time all went well and after updating nothing works.

 

Maybe you can recommend me a shipping modul which is much better.

 

Thanks for your help.

post-336108-0-25833100-1435678359_thumb.png

Link to comment
Share on other sites

Hello Dave @@rubberfashion,

 

Sorry just to be sure: Do you mean by updating to use the quantity update button or did you any update to the code and it stopped working??

 

First of all I saw that you have some modifications in your shopping cart. Could you please give a try with and unmodified shopping cart, of course adding the mod to show the shipping estimator.

 

You can also upload your modified shopping cart file and I'll use it for testing.

 

Kind regards

Rainer

Link to comment
Share on other sites

Hi,

 

i have tried with new shopping_cart.php from fresh installation. No Change.

I had deactivated all shipping modules and deactivate separatly. No Channge.

 

When i push the Update Button (new quantity) the shipping costs window get empty.

 

I do not know if it make sense to send you the code of the edited shopping_cart.php.

 

Maybe it is an error in application_top.php??

 

Maybe i can send you my modified shopping_cart.php via PN.

 

Much Thanks for your help!!

 

Kind Regards

Dave

post-336108-0-97702100-1435687136_thumb.png

post-336108-0-99672700-1435687139_thumb.png

Link to comment
Share on other sites

I had the exact same experience - it works fine on first use but as soon as you add or update anything the information is gone.

 

I already have an older version of Ship In Cart working on 234GOLD BS so wasn't much concerned so just rolled back to it but when I saw the post from @@rubberfashion I thought I'd mention I had the same issue.

 

Greg

 

PHP 5.5.22 MySQL 5.6.23

Link to comment
Share on other sites

Link to comment
Share on other sites

Hello Greg @@BlueBunyip,

 

Please try for now to define all countries for the most expensive shipping zone. I'll try to find a generic fix for all configurations.

 

Please, which version do you use which is working correct on your store??

 

Thank you and kind regards

Rainer

Link to comment
Share on other sites

Hello Greg @@BlueBunyip,

 

I believe I found the error. If you could try:

The Variables “$cart_country_id, $cart_zone” were missing in the globals list.

Please replace line 55 in includes/modules/content/cart/cm_cart_shipping_estimator.php:

      global $oscTemplate, $currencies, $request_type, $cart, $order, $total_count, $method, $module, $shipping, $navigation, $cart_country_id, $cart_zone;

Let me know if it's solved, so I can upload the fix.

 

Thank you and kind regards

Rainer

Link to comment
Share on other sites

Hello Greg @@BlueBunyip,

 

I believe I found the error. If you could try:

The Variables “$cart_country_id, $cart_zone” were missing in the globals list.

Please replace line 55 in includes/modules/content/cart/cm_cart_shipping_estimator.php:

      global $oscTemplate, $currencies, $request_type, $cart, $order, $total_count, $method, $module, $shipping, $navigation, $cart_country_id, $cart_zone;

Let me know if it's solved, so I can upload the fix.

 

Thank you and kind regards

Rainer

Hi Rainer,

 

you also need to add $total_weight to the globals - otherwise the shipment weight is not passed to shipping modules that need the weight. Once this is done it all looks good for me now.

 

 

Great work

 

 

Greg

Link to comment
Share on other sites

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...