Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help for module shipping


Guest

Recommended Posts

Excused for my English

 

I have added this code to the module flat1 :

function flat2() {

global $order, $cart;

 

$this->code = 'flat2';

$this->title = MODULE_SHIPPING_flat2_TEXT_TITLE;

$this->description = MODULE_SHIPPING_flat2_TEXT_DESCRIPTION;

$this->sort_order = MODULE_SHIPPING_flat2_SORT_ORDER;

$this->icon = '';

$this->tax_class = MODULE_SHIPPING_flat2_TAX_CLASS;

$this->enabled = ((MODULE_SHIPPING_flat2_STATUS == 'True') ? true : false);

 

$totale= $cart->show_total();// this is new code

if ($totale > 150.00){

$this->enabled = ((MODULE_SHIPPING_flat1_STATUS == 'False') ? true : false);;}// end new code

 

Cause an error in admin while in catalog is ok .

 

the error causat in admin is :

Fatal error: Call to a member function on a non-object in c:programmieasyphpwwwumbriastyleshopcatalogincludesmodulesshippingflat1.php on line 29

while?

Grazie Antonio

Link to comment
Share on other sites

one thing i noticed is upper

 

MODULE_SHIPPING_TAX_CLASS;

 

 

also all shipping modules have 2 php pages and both will be names the smae and both work together........

 

and usally located in two places.

 

location:catalog/includes/languages/english/modules/shipping/

 

or your language of choice

 

location:catalog/includes/languages/ :!: :?: :!: /modules/shipping/

 

and

 

location:catalog/includes/modules/shipping/

 

 

NOTE ALL CODE IS CASE SENSITIVE!!!!!!!!!

 

NOT tHiS WaY Of DoInG it eather one way or the other........

 

follow the codeing you see before you....

 

 

the following 2 pages repersent the orginal flat rate shipping code.

 

http://cvs.sourceforge.net/cgi-bin/viewcvs....viewcvs-markup

 

your location:catalog/includes/modules/shipping/

 

 

and

 

http://cvs.sourceforge.net/cgi-bin/viewcvs....viewcvs-markup

 

 

your location:catalog/includes/languages/english/modules/shipping/

 

or your language of choice

 

location:catalog/includes/languages/ :!: :?: :!: /modules/shipping/

 

 

the above linked files are unaltered and orginal from source

 

 

thats all the help i can offer you as of now... enjoy

 

ps if you are trying to make a nother selection for you customers at a different flat rate? try copying the two pages renameing the both flat_2.php and then edit each page and add a 2 behind all the words flat but do not change anything else.......

FLAT

 

flat

 

 

maybe that was waht you where trying to do anyhow and place them in the right folders then use them in the admin

 

 

the one file controlls the title and the title language wna what it says dureing checkout....

 

 

bye

:!: first rule: Allways make a backup of a file before you change it. & All code is CASE Sensitive

:!: second rule: Never copy and paist code unless you know it works.

:!: third rule: If you do not know ask.

:!: final rule: Have patience.

Link to comment
Share on other sites

I have to say something here...

 

JUST A GREAT REPLY OnePhatWebyCat

 

 

Nice work ;)

Robert

 

We all need to learn it once, how hard it may seem when you look at it, also you will master it someday ;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...