Forums / Built-in Shipping and Payment Modules / Remove MODULE_SHIPPING_TABLE_TEXT_WAY from checkout steps 2 & 3

Remove MODULE_SHIPPING_TABLE_TEXT_WAY from checkout steps 2 & 3

Locked

Started by ryk on 9 Oct 2007, 8:30 PM · Views: 1,426

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
9 Oct 2007, 8:30 PM
#1
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Remove MODULE_SHIPPING_TABLE_TEXT_WAY from checkout steps 2 & 3

I would like to remove the MODULE_SHIPPING_TABLE_TEXT_WAY element from Checkout steps 2 & 3 in the order total sections.

This is NOT a case of editing the language file ...my language file contains```
define('MODULE_SHIPPING_TABLE_TEXT_DESCRIPTION', 'Special Delivery Next Day');
define('MODULE_SHIPPING_TABLE_TEXT_WAY', 'Orders received by 2pm, Mon-Thurs will be delivered by 1.00pm the next working day Mondays to Fridays (except public and bank holidays)');


Any advice would be welcome.

I should mention that I have several other lengthy "MODULE_SHIPPING_somename_TEXT_WAYS" that require the same treatment.

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !

9 Oct 2007, 9:29 PM
#2
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Remove MODULE_SHIPPING_TABLE_TEXT_WAY from checkout steps 2 & 3

ad this to the tale rate module folder
define('MODULE_SHIPPING_TABLE_TEXT_WAY_EXTRA', '');

and change the define from
MODULE_SHIPPING_TABLE_TEXT_WAY
to
MODULE_SHIPPING_TABLE_TEXT_WAY_EXTRA

in the other pages ( remember to add these to your over rides) .... LOL had to add it

Zen cart PCI compliant Hosting

9 Oct 2007, 10:00 PM
#3
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Remove MODULE_SHIPPING_TABLE_TEXT_WAY from checkout steps 2 & 3

Now why didn't I think of that! Thanks! :bigups:

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !

9 Oct 2007, 10:17 PM
#4
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Remove MODULE_SHIPPING_TABLE_TEXT_WAY from checkout steps 2 & 3

Ummm....so how do I get the differentiation between step 1 where I want the full text and steps 2 & 3 where I want the short version?

I've put the defines in the language files, but the only other reference I can find to MODULE_SHIPPING_TABLE_TEXT_WAY is in includes/modules/shipping/table.php and replacing that with MODULE_SHIPPING_TABLE_TEXT_WAY_EXTRA applies the change to all checkout steps.

It's been a long day so I probably need it spelling out for me.

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !

11 Oct 2007, 10:04 AM
#5
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Remove MODULE_SHIPPING_TABLE_TEXT_WAY from checkout steps 2 & 3

I've still not been able to figure this out, so I'm still looking for advice.

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !

11 Oct 2007, 11:28 AM
#6
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Remove MODULE_SHIPPING_TABLE_TEXT_WAY from checkout steps 2 & 3

Eureka! Not sure if my method was what Merlinpa intended, but I have solved my problem thanks to that suggestion. This was what I did:

  1. Created the MODULE_SHIPPING_TABLE_TEXT_WAY_EXTRA define as suggested in includes/languages/english/modules/shipping/YOUR_TEMPLATE/table.php, and placed most of the text in there.

  2. Edited includes/modules/shipping/table.php and in function quote(), changed this:

$this->quotes = array('id' => $this->code,
    'module' => MODULE_SHIPPING_TABLE_TEXT_TITLE . $show_box_weight,
    'methods' => array(array('id' => $this->code,
    'title' => MODULE_SHIPPING_TABLE_TEXT_WAY,
    'cost' => $shipping + MODULE_SHIPPING_TABLE_HANDLING)));
```to

$this->quotes = array('id' => $this->code,
'module' => MODULE_SHIPPING_TABLE_TEXT_TITLE . $show_box_weight,
'extrainfo'=>MODULE_SHIPPING_TABLE_TEXT_WAY_EXTRA,
'methods' => array(array('id' => $this->code,
'title' => MODULE_SHIPPING_TABLE_TEXT_WAY,
'cost' => $shipping + MODULE_SHIPPING_TABLE_HANDLING)));
3. Edited includes/templates/YOUR_TEMPLATE/tpl_checkout_shipping_default.php, adding

<?php echo $quotes[$i]['extrainfo'] ; ?>

The result is as in the attached screenshot, and all the "additional" info does NOT appear in steps 2 & 3.

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !