A A A

Please consider registering
guest

Log In Register

Login form protected by Login LockDown.


Register | Lost password?
Advanced Search:

— Forum Scope —



— Match —



— Forum Options —




Wildcard usage:
*  matches any number of characters    %  matches exactly one character

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

Topic RSS
Shipping Charge Based on Order Total Amount
January 18, 2012
1:01 am
Admin
Forum Posts: 5051
Member Since:
March 16, 2008
Offline
21

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
Member
Forum Posts: 10
Member Since:
January 12, 2012
Offline
22

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
Admin
Forum Posts: 5051
Member Since:
March 16, 2008
Offline
23

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

January 18, 2012
1:20 am
Member
Forum Posts: 10
Member Since:
January 12, 2012
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
Member
Forum Posts: 10
Member Since:
January 12, 2012
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
Member
Forum Posts: 10
Member Since:
January 12, 2012
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
Admin
Forum Posts: 5051
Member Since:
March 16, 2008
Offline
27

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
Member
Forum Posts: 10
Member Since:
January 12, 2012
Offline
28

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
Admin
Forum Posts: 5051
Member Since:
March 16, 2008
Offline
29

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
Admin
Forum Posts: 5051
Member Since:
March 16, 2008
Offline
30

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
New Member
Forum Posts: 1
Member Since:
April 14, 2012
Offline
31

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
Admin
Forum Posts: 5051
Member Since:
March 16, 2008
Offline
32

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.

Forum Timezone: UTC 0

Most Users Ever Online: 40

Currently Online:
24 Guest(s)

Currently Browsing this Page:
2 Guest(s)

Top Posters:

icy1: 2371

wreed06: 175

laurie390: 168

StitchTek Services, LLC: 144

boutiqueelliette: 130

yiorgos: 127

Member Stats:

Guest Posters: 428

Members: 2252

Moderators: 1

Admins: 1

Forum Stats:

Groups: 1

Forums: 4

Topics: 2983

Posts: 16042

Moderators: Market Admin (5051)

Administrators: Market Admin (5051)

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