Jump to content
dmGremlin

[contribution] individual product shipping prices

Recommended Posts

I had everything working on my staging server but now on my live site when I checkout on the shipping page it only shows

"This is currently the only shipping method available to use on this order." with no options below it. I'm using all of the same files that were on my staging server???

 

I'm lost :(, any help would be appreciated.

BTW, thank you for the great contribution.

 

if you want to have options you have to get the multiple shipping version of this

Share this post


Link to post
Share on other sites

ok i did a little digging on the below error I am getting on the order confirmation page. IF i remove line 29 and 30 from ot_tax.php it removes the errors but the total still shows $0.00 I am still totally lost and cant figure out what to do. :huh:

 

Warning: Variable passed to reset() is not an array or object in /usr341/home/e/v/everspee/public_html/includes/modules/order_total/ot_tax.php on line 29

Warning: Variable passed to each() is not an array or object in /usr341/home/e/v/everspee/public_html/includes/modules/order_total/ot_tax.php on line 30

Share this post


Link to post
Share on other sites

ok i did a little digging and the error will go away if I disable tax from showing via the admin panel. But im also having a problem with the total...everything on the confirmation pages shows 0.00 as the totals. im thinking i may have messed up my coding in something. ANY HELP IS APPREICATED! lol this has become an all day event

Warning: Variable passed to reset() is not an array or object in /usr341/home/e/v/everspee/public_html/includes/modules/order_total/ot_tax.php on line 29

Warning: Variable passed to each() is not an array or object in /usr341/home/e/v/everspee/public_html/includes/modules/order_total/ot_tax.php on line 30

 

sorry for the double post but it would'nt let me edit it...MOD please delete my post before this

Share this post


Link to post
Share on other sites
I had everything working on my staging server but now on my live site when I checkout on the shipping page it only shows

"This is currently the only shipping method available to use on this order." with no options below it. I'm using all of the same files that were on my staging server???

 

I'm lost :(, any help would be appreciated.

BTW, thank you for the great contribution.

 

Nevermind, figured it out :D

Share this post


Link to post
Share on other sites

No where in instructions does it say to edit ot_tax.php nor any tax values. You need to check your codes and steps. People have emailed me for that same error

Warning: Variable passed to reset() is not an array or object in /usr341/home/e/v/everspee/public_html/includes/modules/order_total/ot_tax.php on line 29

Warning: Variable passed to each() is not an array or object in /usr341/home/e/v/everspee/public_html/includes/modules/order_total/ot_tax.php on line 30

and it is because they did something wrong in order.php. Either you forgot to delete something (usually the case) or you forgot to add a global. Two people had two global lines. Check your order.php that is where the problem is coming from NO WHERE ELSE.


q_|_|| _|9~~J >-o>-o q_|_|| )| q_|| )

Share this post


Link to post
Share on other sites

GOT IT!!!

 

lol thank you yet again crashwave you were correct on the orders.php

 

heres what i had:

 

 function cart() {
     global $customer_id, $sendto, $billto, $cart, $languages_id, $currency, $currencies, $shipping, $payment;
function cart() {
  global $customer_id, $sendto, $billto, $cart, $languages_id, $currency, $currencies, $shipping, $payment, $shipping_modules;//phpmom.com indv ship added

due to the instructions saying to add ANOTHER function instead of chang ethe function so now its just:

 

	function cart() {
  global $customer_id, $sendto, $billto, $cart, $languages_id, $currency, $currencies, $shipping, $payment, $shipping_modules;//phpmom.com indv ship added

 

hope this will help anyone else that is having this problem!! :lol: :lol: :rolleyes:

Share this post


Link to post
Share on other sites

BTW instructions do not say add another function they said add another global

I changed it somewhat to this

function cart() {

global $customer_id, $sendto, $billto, $cart, $languages_id, $currency, $currencies, $shipping, $payment;

add $shipping_modules as a global like this

function cart() {

global $customer_id, $sendto, $billto, $cart, $languages_id, $currency, $currencies, $shipping, $payment, $shipping_modules;

 

to add another global does not mean to write the word global again, just add to it.

Edited by crashwave

q_|_|| _|9~~J >-o>-o q_|_|| )| q_|| )

Share this post


Link to post
Share on other sites
BTW instructions do not say add another function they said add another global

I changed it somewhat to this

function cart() {

global $customer_id, $sendto, $billto, $cart, $languages_id, $currency, $currencies, $shipping, $payment;

add $shipping_modules as a global like this

function cart() {

global $customer_id, $sendto, $billto, $cart, $languages_id, $currency, $currencies, $shipping, $payment, $shipping_modules;

 

sorry i must have misunderstood i am new to php BTW i never got a chance to say thank you for this great contribution and all of your help..so thank you crashwave

Edited by swishemart

Share this post


Link to post
Share on other sites

We got the basic feature of the contribution to work. How do we display the shipping price with the item info on the product_info.php page? I would like to display the shipping cost below the price. Can I add a call to the items page for example.

 

Shipping inside United States: $10.00

Shipping outside United States: Quoted at time of purchase

 

Thanks

Elizabeth

Share this post


Link to post
Share on other sites
We got the basic feature of the contribution to work. How do we display the shipping price with the item info on the product_info.php page? I would like to display the shipping cost below the price. Can I add a call to the items page for example.

 

Shipping inside United States: $10.00

Shipping outside United States: Quoted at time of purchase

 

Thanks

Elizabeth

 

Here is what I rigged up for my site. I am showing free shipping on items marked with "0" and not displaying anything for items with a price. If you want to show the price instead read my comment in the commented out line. I have no idea how to program so if it's sloppy code I appologize.

 

put this code in product_info.php

 

<?php $products_shipping_query = tep_db_query("select products_ship_price from " . TABLE_PRODUCTS_SHIPPING . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");// hadir//phpmom.com
? ? ? ? ?$products_shipping = tep_db_fetch_array($products_shipping_query);//phpmom.com
? ? ? ? ?$products_array[] = array('id' => $products_id,
? ? ? ? ?'products_ship_price' => $products_shipping['products_ship_price']);
? ? ? ? ?$products_ship = $products_shipping['products_ship_price'];
? ? ? ? ?if ( $products_ship == 0 ) {
? ? ? ? ?$products_ship = 'Free Shipping';
? ?}else{
? ? ? ? ?$products_ship = "";
? ?//Show price instead and comment the line above out// $products_ship = "Shipping: $" .$products_shipping['products_ship_price']."\n";
? ? ? ? ? ? ?}
?><br><? echo $products_ship;?>

 

below

 

<?php echo $products_price; ?>

Edited by jay jay

Share this post


Link to post
Share on other sites

Thanks Jay Jay

I am not a programer either so I am hoping someone could look at this code and alter it to do the shipping inside US ect....

 

We got the basic feature of the contribution to work. How do we display the shipping price with the item info on the product_info.php page? I would like to display the shipping cost below the price. Can I add a call to the items page for example.

 

Shipping inside United States: $10.00

Shipping outside United States: Quoted at time of purchase

Share this post


Link to post
Share on other sites

here is my code for the products page. The echo statement for the price is toward the bottom

 

// extra field modifications gs

if (tep_not_null($product_info['products_url'])) {

echo '<p>' . sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)). '</p>';

}

if (tep_not_null($product_info['products_dimensions'])) {

echo '<p>' . TEXT_PRODUCTS_DIMENSIONS . ' ' . stripslashes($product_info['products_dimensions']) . '</p>';

}

 

if (tep_not_null($product_info['products_height'])) {

echo '<p>' . TEXT_PRODUCTS_HEIGHT . ' ' . stripslashes($product_info['products_height']) . '</p>';

}

 

if (tep_not_null($product_info['products_width'])) {

echo '<p>' . TEXT_PRODUCTS_WIDTH . ' ' . stripslashes($product_info['products_width']) . '</p>';

}

 

if (tep_not_null($product_info['products_depth'])) {

echo '<p>' . TEXT_PRODUCTS_DEPTH . ' ' . stripslashes($product_info['products_depth']) . '</p>';

}

 

if (tep_not_null($product_info['products_style'])) {

echo '<p>' . TEXT_PRODUCTS_STYLE . ' ' . stripslashes($product_info['products_style']) . '</p>';

}

 

if (tep_not_null($product_info['products_condition'])) {

echo '<p>' . TEXT_PRODUCTS_CONDITION . ' ' . stripslashes($product_info['products_condition']) . '</p>';

}

 

if (tep_not_null($product_info['products_year'])) {

echo '<p>' . TEXT_PRODUCTS_YEAR . ' ' . stripslashes($product_info['products_year']) . '</p>';

}

 

if (tep_not_null($product_info['products_reference'])) {

echo '<p>' . TEXT_PRODUCTS_REFERENCE . ' ' . stripslashes($product_info['products_reference']) . '</p>';

}

 

if ( ($product_info['products_quantity'] <= 0) && (STOCK_CHECK =='true') ) {

echo '<br>' . TEXT_OUT_OF_STOCK . '<br><br>';

} else {

 

echo '<p><font class="productprice">' . TEXT_PRODUCTS_PRICE . ' ' . stripslashes($products_price) . '</font></p>';

}

 

//echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);

?>

</TD>

Share this post


Link to post
Share on other sites

Jay Jay,

 

Thanks. That saved me a little time. That was kind of what I was looking for. Here's what I ended up with.

// ADDITIONAL CODE FOR INDIVSHIP
$products_shipping_query = tep_db_query("select products_ship_price from " . TABLE_PRODUCTS_SHIPPING . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
       $products_shipping = tep_db_fetch_array($products_shipping_query);
       $products_shipping_price = $products_shipping['products_ship_price'];

       if ( $products_shipping_price == 0 ) {
       $products_ship = TEXT_SHIP_NO_PRICE . TEXT_SHIP_NONUS;
 }else{
   $products_ship = TEXT_SHIP_PRICE . $products_shipping_price . TEXT_SHIP_NONUS;
           }
 echo $products_ship;
// END ADDITIONAL CODE FOR INDIVSHIP

 

With some new defines in the /languages/english/product_info.php file for the TEXT_SHIP_NO_PRICE, TEXT_SHIP_PRICE, and TEXT_SHIP_NONUS .

 

;)

Share this post


Link to post
Share on other sites

DEFINE('TEXT_SHIP_NO_PRICE','Shipping inside US: $12.00<br>Shipping outside US: Quoted at time of purchase <br>');

DEFINE('TEXT_SHIP_PRICE','Shipping inside US: $');

DEFINE('TEXT_SHIP_NONUS','<br>Shipping outside US: Quoted at time of purchase <br>');

Share this post


Link to post
Share on other sites

Glad you guys got it working.

Sorry I couldn't help. Sick today. Went to take an hour nap at 4:30 got up 7 hours later.


q_|_|| _|9~~J >-o>-o q_|_|| )| q_|| )

Share this post


Link to post
Share on other sites

Can someone give a better explantion of this

 

Zip Code notnull

Indv. Shipping Price: notnull

Each Additional Price: notnull

 

Why would you want the zip code?

What is the Each Additional Price used? Can someone give an example?

 

thanks

Elizabeth

Share this post


Link to post
Share on other sites
Can someone give a better explantion of this

Zip Code?  notnull

Indv. Shipping Price:?  notnull

Each Additional Price:?  notnull

 

The null and not null part was for me really to test the values of the database so I can write the code correctly. That can be removed.

 

The zip code really does nothing with individual shipping other than let you know where it will be shipped from. Hopefully it will work with the Multishipping contribution that is in the works. It came with the original contribution and I think it is used by other contributions too. For now it is just there.

The additional shipping is if customer buys more than one of the product. 1st item shipped at indv price second and so on shipped at additional price.

Edited by crashwave

q_|_|| _|9~~J >-o>-o q_|_|| )| q_|| )

Share this post


Link to post
Share on other sites

Would anyone know how to add each product id with products_ship_price = 0 or some number to the products_shipping table in mysql?

Share this post


Link to post
Share on other sites

Anyone know of a way to have a pop-up widow or just show the items being purchased with the idividual shipping prices for each on the checkout_shipping page?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×