A A A
Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 4 characters - maximum search word length is 84 characters

No permission to create posts
sp_Feed Topic RSS sp_TopicIcon
Shipping Charge Based on Order Total Amount
January 18, 2012
1:01 am
Avatar
Admin
Forum Posts: 5862
Member Since:
March 16, 2008
sp_UserOfflineSmall Offline

I understand what you're trying to do.

I believe the error is not related to what you've done, but to something else. I'm pretty sure, that the problem you're having, isn't related to the code changes but to a session variable that's not getting saved like it should.

January 18, 2012
1:02 am
Avatar
gina
Member
Members
Forum Posts: 10
Member Since:
January 12, 2012
sp_UserOfflineSmall Offline

Sorry didnt see your post, I meant the link on the post # 15 wasnt helpfull.

The link you have on #67 was helpfull Im calling Hostgator now for assistance with the file on php.ini

But once that is turned off what modifications do I make on the cart.php.

could you just copy and paste the coding on a post. i get confused with all the different coding specifications.

January 18, 2012
1:09 am
Avatar
Admin
Forum Posts: 5862
Member Since:
March 16, 2008
sp_UserOfflineSmall Offline

After they make that change, just do the modifications in #10 above again, and that should be it.

January 18, 2012
1:20 am
Avatar
gina
Member
Members
Forum Posts: 10
Member Since:
January 12, 2012
sp_UserOfflineSmall Offline

ok, got hostgator to get the php.ini turned off and did the modifications mentions now i got an error on page #132

January 18, 2012
1:36 am
Avatar
gina
Member
Members
Forum Posts: 10
Member Since:
January 12, 2012
sp_UserOfflineSmall Offline

I looked closer and the last line i edited was missin a ; after 14.95 

So I dont get any error message anymore but the shipping doenst calculate properly.

entered: 

if ($i > 0) { $ShippingTotal = 5.95; }
if ($i > 6) { $ShippingTotal = 10.95; }
if ($i > 30) { $ShippingTotal = 14.95; }
$checkout .='<input type="hidden" name="shipping_1" value="'.$ShippingTotal.'" />';
No metter how many items i add to cart it only charges $5.95
January 18, 2012
2:03 am
Avatar
gina
Member
Members
Forum Posts: 10
Member Since:
January 12, 2012
sp_UserOfflineSmall Offline

BTW also changed my image path settings from "absolute" to "relative"

Still doesn't calculate properly.

Can someone please help me!?

January 18, 2012
2:44 am
Avatar
Admin
Forum Posts: 5862
Member Since:
March 16, 2008
sp_UserOfflineSmall Offline

Why are you using "$i"?

 

if($i > 0) ...

 

You should be using the variable "$GrandTotal" like in post #10.  All you should modify is the number that "$ShippingTotal" is equal to in the various levels.

 

if($GrandTotal > 0)...


January 20, 2012
1:48 am
Avatar
gina
Member
Members
Forum Posts: 10
Member Since:
January 12, 2012
sp_UserOfflineSmall Offline

For those wanting to do pricing based on the number of items, instead of adding the code:
if ($GrandTotal > 0) { $ShippingTotal = 6.50; }
if ($GrandTotal > 100.00) { $ShippingTotal = 9.50; }
if ($GrandTotal > 200.00) { $ShippingTotal = 12.50; }
if ($GrandTotal > 300.00) { $ShippingTotal = 15.50; }
$checkout .='';
 
you could do something like this, based on the quantity of items ($i = quantity of items).
For example:  
    For 1-6 items = $6.50
    For 7-30= $9.50
    For 31 – 72= $12.50
    For 73 and above = $15.50
 
if ($i > 0) { $ShippingTotal = 6.50; }
if ($i > 6) { $ShippingTotal = 9.50; }
if ($i > 30) { $ShippingTotal = 12.50; }
if ($i > 72) { $ShippingTotal = 15.50; }
$checkout .='';

The above is the post u directed me to. So I followed it.
I'm getting discouraged with market theme.
The shipping is just not working the way I want to.

Since all my products are the same price, I calculated based on the amount charged:
f ($GrandTotal > 0) { $ShippingTotal = 6.50; }
if ($GrandTotal > 100.00) { $ShippingTotal = 9.50; }
if ($GrandTotal > 200.00) { $ShippingTotal = 12.50; }
if ($GrandTotal > 300.00) { $ShippingTotal = 15.50; }
$checkout .=''

Now I got an error on line #199

January 20, 2012
10:26 pm
Avatar
Admin
Forum Posts: 5862
Member Since:
March 16, 2008
sp_UserOfflineSmall Offline

If you create a temporary Wordprss user account for me, I can log into your site and take a look.

You can send the login info to:  support [at] markettheme.com

March 9, 2012
8:49 pm
Avatar
Admin
Forum Posts: 5862
Member Since:
March 16, 2008
sp_UserOfflineSmall Offline

Here's what the code mod should be if you want to base your shipping total on the number of items in the order.

 

On, or around line #185 you'll see the following line of code:

// Create value for inventory control

 

IMMEDIATELY before that line, enter the following new lines of code:

 

// Set shipping rate based on total order quantity            
$totalquan=$totalquan+$crtQuantity[$item];    
if ($totalquan > 0) { $ShippingTotal = 4.50; }
if ($totalquan > 5) { $ShippingTotal = 9.50; }
if ($totalquan > 10) { $ShippingTotal = 12.50; }

and save the file.

Alter the quantity levels you want to test for (the numbers 5,10,15) , and the corresponding shipping total (4.50, 9.50, 12.50).

The above is for 3 levels, but if you want to add more levels you certainly can. The format would be like this:

// Set shipping rate based on total order quantity            
$totalquan=$totalquan+$crtQuantity[$item];    
if ($totalquan > 0) { $ShippingTotal = 4.50; }
if ($totalquan > 5) { $ShippingTotal = 9.50; }
if ($totalquan > 10) { $ShippingTotal = 12.50; }
if ($totalquan > 15) { $ShippingTotal = 15.50; }
if ($totalquan > 20) { $ShippingTotal = 19.50; }
if ($totalquan > 25) { $ShippingTotal = 24.50; }

Again, change the threshold quantities, and the corresponding shipping values.

I hope this helps.

April 22, 2012
3:25 am
Avatar
lighthouselures
New Member
Members
Forum Posts: 2
Member Since:
April 14, 2012
sp_UserOfflineSmall Offline

Hi where do I find the market theme files area? I am new to this and I am trying to figure things out but I am running into a few issues? Is this in the Dashboard under market theme or do I change the files and then reload them?? Sorry very confused!

 

Market Admin said

There have been a few requests forthe ability to offer different flat rate shipping options, based on order amount.

Let's say that you wanted to offer 2 flat rate shipping charges based on the order total.

For example:

Order total $0.00 to $100.00 = $6.50 shipping
Order total $100.01 to and up = $9.50 shipping

This functionality can be added to the Market Theme system without a whole lot of trouble.  

Here's how...

Open up your "cart.php" file for editing.  (This file is located in the "ajCart/" folder of the Market Theme files area.)

On or around line #100, you will find this line of code:

 

                    $checkout .='<input type="hidden" name="shipping_'.$i.'" value="'.$Shipping.'" />';

 

Disable the line by changing it to this:

 

                    // $checkout .='<input type="hidden" name="shipping_'.$i.'" value="'.$Shipping.'" />';

Next, on or around line #104 you will find this line of code:

            $GrandTotal = $GrandTotal + ($crtAmount[$item] * $crtQuantity[$item]);

For this support post example, we will use the shipping rates as outlined above.  So, immediately AFTER this line, enter the following lines:

 

if ($GrandTotal > 0) { $ShippingTotal = 6.50; }
if ($GrandTotal > 100.00) { $ShippingTotal = 9.50; }
$checkout .='<input type="hidden" name="shipping_1" value="'.$ShippingTotal.'" />';

Save the file, and that's it.

To take this a step further..  Let's say you actually wanted 4 shipping ranges like this instead of 2:

Order total $0.00 to $100.00 = $6.50 shipping
Order total $100.01 to $200.00 = $9.50 shipping
Order total $200.01 to $300.00 = $12.50 shipping
Order total $300.01 and up = $15.50 shipping

For a scenario like this, you would simply add two more lines of code in similar fashion as you just did, only changing the range of the Grand Total.  

So, for this new example you would instead enter these lines:

 

if ($GrandTotal > 0) { $ShippingTotal = 6.50; }
if ($GrandTotal > 100.00) { $ShippingTotal = 9.50; }
if ($GrandTotal > 200.00) { $ShippingTotal = 12.50; }
if ($GrandTotal > 300.00) { $ShippingTotal = 15.50; }
$checkout .='<input type="hidden" name="shipping_1" value="'.$ShippingTotal.'" />';

Save the file, and that would do it.

April 23, 2012
5:44 pm
Avatar
Admin
Forum Posts: 5862
Member Since:
March 16, 2008
sp_UserOfflineSmall Offline

When I say "Market Theme files area", I am referring to the folder location on your hosting account.

Generally, it's at:

wp-content/themes/mk4/

When you log into your hosting account via FTP, you can navigate to this folder.

(You can use Filezilla for your FTP program if you don't already have one. It's free, and you can get it online by doing a google search for "filezilla")

I hope this helps.

Many times however, you can edit files through the "Editor" tool under the "Appearance" menu tab of the Wordpress dashboard.

July 24, 2013
4:02 pm
Avatar
heavenlypurls
New Member
Members
Forum Posts: 1
Member Since:
April 8, 2012
sp_UserOfflineSmall Offline

Hi all

I hope this is the right place to ask - it's related to this topic at least. I edited my code to allow one flat rate domestic shipping charge, which works perfectly, but now I want to add a flat rate international shipping charge, alongside the existing domestic one. I want customers to be able to pay one shipping charge regardless of the quantity of items or total cost of items in their cart, but I want to charge a different rate for international shipping. I hope that makes sense!

Do I need to add code to what I already have in place, or change the code? I know a little code but I am rusty and I have never been an expert, so any and all assistance is greatly appreciated.

Thank you very much, and my apologies if this is posted in the wrong place!

August 14, 2013
6:18 pm
Avatar
Admin
Forum Posts: 5862
Member Since:
March 16, 2008
sp_UserOfflineSmall Offline

Hi,

In your Wordpress Administration area, under the Market Theme tab -- go to shipping options.

In the "Calculate by Order Total" section at the top, you'll just simply need to add in your International rate in the appropriate row, and update the changes.

No permission to create posts
Forum Timezone: UTC 0

Most Users Ever Online: 213

Currently Online:
3 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

icy1: 2636

wreed06: 175

laurie390: 169

boutiqueelliette: 156

StitchTek Services, LLC: 144

yiorgos: 127

Member Stats:

Guest Posters: 457

Members: 2471

Moderators: 1

Admins: 1

Forum Stats:

Groups: 1

Forums: 4

Topics: 4078

Posts: 18978

Newest Members: teddy1, raycrean, tseibt55, aceman, peteryoung320@gmail.com, JdsCentral

Moderators: Market Admin: 5862

Administrators: Market Admin: 5862

Market takes ecommerce to the next level with an easy to use, quick setup platform. Learn more or take the tour.