Tom Muck

Alpha Dog Blues Band
Home page
All articles
All Extensions | Extension News | Extension FAQs | Customer Login
Books authored or co-authored by Tom Muck
Extensions, books, and other products | Customer Login
Your current cart contents
Tom-Muck.com Blog | CMXTraneous Blog | Flash Remoting Blog
About the site

Cost Based Shipping

Using Cost-based shipping in Cartweaver

Cartweaver uses a base rate for shipping or a weight-based shipping or both, but no cost-based shipping without modifications. Here is a simple way to do cost-based shipping in Cartweaver:

  1. We'll assume that you want "cost-based" instead of "weight-based" shipping, so change all references from "weight" to "cost"
  2. In every product sku, make the weight field = the price field. This can be done across the board simply with a query:

    UPDATE tbl_skus SET SKU_Weight = SKU_Price
  3. Set weight ranges in the Cartweaver admin as cost ranges. In other words, instead of 0-10 pounds, the figures represent 0-10 Dollars/Pounds/whatever.

That is all. No changes need to be made to code, but you may desire to have the SKU_Weight automatically take the SKU_Price value. A simple change to the admin/CWProductAction.php file will take care of that at or around line 147:

from this:

$_POST["SKU_Weight"] = isset($_POST["SKU_Weight"]) ? $_POST["SKU_Weight"] : "0";

to this:

$_POST["SKU_Weight"] = isset($_POST["SKU_Price"]) ? $_POST["SKU_Price"] : "0";

Back to Cartweaver PHP FAQ, code changes, and samples

Pay me securely with your Visa, MasterCard, Discover, or American Express card through PayPal!
Pay me securely with your Visa, MasterCard, Discover, or American Express card through PayPal!
About | Privacy Policy | Contact | License Agreement | ©2002-2025 Tom Muck | Dreamweaver Extensions