Changing Weight to price based in zones.php

Open to all! Ask other shopowners for help.
raiwa
Certified Developer
Posts: 1640
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Has thanked: 70 times
Been thanked: 152 times

Re: Changing Weight to price based in zones.php

Post by raiwa »

Code: Select all

<?php
/*
  
  class table_zone_1 extends abstract_shipping_module {

 
You can not use underscore in shipping modules file and class name.
Try with: “tableZoneOne”
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
burt
Core Team
Posts: 4551
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Changing Weight to price based in zones.php

Post by burt »

Weights are not in anything. Just units.
What unit a shopowner decides to use...is up to them.

There are ounces in the UK. Not much used, I guess.
I am not here to build for you.
I am here to build with you. Let's help each other.
14Steve14
Senior Contributor
Posts: 922
Joined: Fri Oct 25, 2019 7:01 pm
Phoenix Version: v1.0.9.1
Has thanked: 17 times
Been thanked: 103 times

Re: Changing Weight to price based in zones.php

Post by 14Steve14 »

We use grams in our shop and have not changed anything apart from the number of decimal places where the weight shows in the database.

We weigh all of our products in grams. In the products we enter 1 gram as 0.001, 100 grams is 0.100.

We then found all instances of decimal(4,2) these may be different in your version, and changed them to decimal(4,3). That should give you 3 digits after the decimal place. We could have reduced the number of digits before the decimal place but left them as they were. The main weight was found in the Products table and its easy to change using your database tool, mysql, or what ever you use.

In the shipping modules we enter weight and costs as 0.750:3.60, 2.000:4.30, There is no need for the zeros at the end but we kept them there to make things easy for us, and it could be wrote as 0.75:3.6, 2:4.3,

Then I believe that there were some instances in the shipping module language files where there were Lbs for pounds which we changed to Kg for Kilograms.

That was about all we did as far as I can remember.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply