Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2008
    Posts
    151
    Plugin Contributions
    0

    Default Completely hide / remove the shipping module title

    Hi,

    I'm only using one shipping module (ceon advanced shipper) and since it is so advanced (:)) I no longer have the need of showing the name of the actual shipping module. (Leaving it blank in the language file is unfortunately no option... results in a blank page and ceon even warns about this in the language file)

    By default, it would look like this on checkout step 1 :

    Click image for larger version. 

Name:	shipping_method_default.jpg 
Views:	104 
Size:	40.1 KB 
ID:	14731

    The customer obviously don't need to know what my shipping module is called, so I changed it to "How do you want us to ship your stuff?". Not the best solution, but it was good enough at the time :).

    Now I'm looking for the best way to completely remove this line, from all places where it's being shown.

    Eventually I figured out that what is being shown there is a variable called "module", which is created in the actual shipping module, in this case :

    Code:
    		$this->quotes = array(
    			'id' => $this->code,
    			'methods' => array(),
    			'module' => MODULE_ADVANCED_SHIPPER_DEFAULT_TITLE
    			);
    So, after this amazing discovery :), I went back to my tpl_checkout_shipping_default.php file, and by commenting out this line I at least got it to not show on checkout step 1 :

    Code:
        <fieldset class="box">
          <span class="legend"><?php  echo $quotes[$i]['module']; ?>&nbsp;<?php if (isset($quotes[$i]['icon']) && zen_not_null($quotes[$i]['icon'])) { echo $quotes[$i]['icon']; } ?></span>
    However, it's still being shown at other pages, for example in the shipping estimator and at checkout step 3.

    I obviously don't need to show this info here :

    Click image for larger version. 

Name:	Screen Shot 2014-11-26 at 21.46.42.png 
Views:	100 
Size:	52.1 KB 
ID:	14732

    My php skills aren't that great yet, and just randomly removing every "$module" from shipping_estimator.php and hoping for the best feels risky, plus I assume it needs to be changed in other places as well.

    If someone could point me in the right direction I would be truly grateful!

    Cheers

    Peter

  2. #2
    Join Date
    Jan 2013
    Location
    New Port Richey, Florida
    Posts
    968
    Plugin Contributions
    0

    Default Re: Completely hide / remove the shipping module title

    found this in the readme
    How can the overall title of the module, and/or the brackets surrounding the shipping method quotes/titles, be removed from the quotes/titles?
    Unfortunately the formatting/display of the overall quotes/titles cannot be controlled by Advanced Shipper. It is Zen Cart itself which controls this formatting/display.

    To change this formatting/display, changes must be made to core Zen Cart files.

    Important! Please Note: Below will follow some hints and two examples of how to make these changes. However, these changes are regarded by Ceon as “custom coding” and are therefore not covered by the free support offered with the purchase of the Advanced Shipper distribution from Ceon's website.

    If support from Ceon is required regarding these sorts of changes, payment to Ceon will be required to cover the time spent.
    Modifications introduction
    Zen Cart adds the module's title and the brackets to the quote(s)/title(s) in several files. Two of these files are discussed below. However, the store's Zen Cart installation may be customised and may have additional files which format/display this information. The format of the code - and subsequently the changes necessary - should be fairly similar in each file.

    includes/modules/pages/checkout_shipping/header_php.php
    The following line in this file adds the module's title to the formatting/display output, “$quote[0]['module'] .”, and adds brackets around the output from Advanced Shipper, “' (' .” and “. ')'”:

    'title' => (($free_shipping == true) ? $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')'),

    To remove the module's title and the brackets from the display output, leaving only the actual shipping method quote(s), the line could be updated as follows:

    'title' => (($free_shipping == true) ? $quote[0]['methods'][0]['title'] : $quote[0]['methods'][0]['title']),

    includes/templates/template_default/templates/tpl_modules_shipping_estimator.php
    As with any other template file being modified for a store, the template file should copied from the template_default/templates folder to the template folder for the store.

    The following line in this file is one of several lines in the file which adds the module's title to the formatting/display output, “echo $quotes[$i]['module'];”, and adds brackets around the output from Advanced Shipper, “&nbsp;(” and “)”:

    <td><?php echo $quotes[$i]['module']; ?>&nbsp;(<?php echo $quotes[$i]['methods'][0]['title']; ?>)</td>

    To remove the module's title and the brackets from the display output, leaving only the actual shipping method quote(s), the line could be updated as follows:

    <td><?php echo $quotes[$i]['methods'][0]['title']; ?></td>

    The other lines of the file which also add the module's title and brackets to the display output are very similar so will not be discussed here.

  3. #3
    Join Date
    Apr 2008
    Posts
    151
    Plugin Contributions
    0

    Default Re: Completely hide / remove the shipping module title

    OOOPS... Even though I have made other core changes with instructions from that readme file, I obviously completely missed that one.

    So, thanks jimmie, you definitely pointed me in the right direction just like I asked for :). Problem solved.

    Cheers

    Peter

 

 

Similar Threads

  1. Remove Shipping Title from Check Out "Your Total" module?
    By glw35 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 27 Dec 2010, 10:11 AM
  2. how to remove/hide unwated copy in the pop-up shipping estimator window?
    By Inudat1966 in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 20 Jul 2010, 07:21 PM
  3. How do I remove the header completely
    By mollycakes in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 24 Apr 2008, 06:01 AM
  4. How to completely remove shipping from Zen Cart
    By sddreamweavers in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 4 Jan 2007, 02:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg