Jump to content

[Resolved] Rename All in One Shipping and Paypal Pro


Majjy

Recommended Posts

Hi,

I would like all instances of the words All in one Shipping and PayPal Pro to be removed from admin, order details,etc.., and on all email templates.  PayPal Pro can be renamed to something like Credit Card if need be.  Any help is appreciated.

Thanks,

Claudia

Link to comment
Share on other sites

I see two approaches:

1: remove the variable that holds the name of the module used to transact the payment and/or ship the item from all the templates,

2: remove the columns 'ship_method' and 'gateway' in the database table CubeCart_order_summary.

 

#1 would eventually result in a custom skin, so there is plenty of advice on these forums on how to do that.

 

#2 is very easy but may have devastating consequences, the likes of which I cannot fathom. (Almost all of CubeCart's database routines can handle queries with column names in the query that do not actually exist.)

 

Both options would also require that the templates and/or languages be edited to remove the contextual environment of that data. For example (not a real sample):

{$LANG.shipping.description} {$SUM.ship_method}

renders to: The shipping method chosen is: By Category

 

If, on the other hand, just getting All in One Shipping to acquire an admin-stated title, like as is available in Flat Rate or Free Shipping, may involve some serious code edits but entirely do-able.

 

Or, and which you suggest is acceptable with regards to PayPal Pro, maybe a solution is just to rename (better to make and use a copy) the folder from All_in_One_Shipping to whatever you want to say, such as the ambiguous General_Shipping or just Shipping. (You will also need to edit the config.xml file in the newly named folder.)

Link to comment
Share on other sites

So if I change the file name - /modules/shipping/All_In_One_Shipping to something like/modules/shipping/Shipping and change the config file to match this change I should be alright and that is all I need to do?

Same with /modules/plugins/PayPal_Pro - change the file name  to something like /modules/plugins/credit card and change the config file to match and that is all I need to do?

 

In an order, on the PayPal transaction it shows the shipping as (not exact) all-in-one-shipping-USPS-priority and i don't want the all-in-one-shipping part to show.  Same on the customer's order history, packing slip and in admin.  Will this take care of all that?  It will show whatever I rename it?  i'm not really worried about the PayPal Pro part.

Thanks,

Claudia

Link to comment
Share on other sites

all-in-one-shipping-USPS-priority

 

I think the USPS Priority is a name you gave to a certain shipping condition within the AIOS module.

 

But All In One Shipping is very likely coming from the name of the folder because I can't find any code in the shipping class that specifically names this module.

 

So, based on that, I would say making a copy of All_In_One_Shipping (name it Shipping perhaps) and edit the config.xml file to match, and you should get what you want. We can tweak whatever may not be showing exactly what is wanted.

Link to comment
Share on other sites

Well, by making a copy of the folder with a new name (and having edited config.xml to match), the existing settings for AIOS will not be disturbed.

 

But the settings will not carry over to the new module.

 

Here's what you can do if you have direct access to the database:

1. Enable the new module. It may be called Shipping (or whatever). Do not worry about making any settings. Click Save.

2. Access your database and find the CubeCart_config table.

3. Find the specific row that has in the 'name' column, "All_In_One_Shipping".

4. Copy the contents in the 'array' column.

5. Find the specific row that has in the 'name' column, "Shipping".

6. Paste what was just copied above, replacing the current contents in the 'array' column.

 

In CubeCart, bring the Shipping module up for editing. Verify that the zones and conditions appear correct.

Link to comment
Share on other sites

Checking the files after i downloaded the folder All in one shipping,  I found this in the shipping.class.php file.

<?php
/*-----------------------------------------------------------------------------
 * All In One Shipping with Postcodes CC5
 *-----------------------------------------------------------------------------
 * Author:   Estelle Winterflood
 * Email:    [email protected]
 * Store:    http://cubecart.expandingbrain.com
 *
 * Date:     July 22, 2012
 * Updated:  n/a
 * Compatible with CubeCart Version:  5.x.x
 *-----------------------------------------------------------------------------
 */

class All_In_One_Shipping {
    private $_basket;
    private $_settings;
    private $_config;
    private $_package;

  Should I change the class to my new class or keep it as is.

Thanks, Claudia

Link to comment
Share on other sites

Ok, wanted to let you know what I did and what happened when I did it.

I downloaded the module/shipping/all in one shipping folder onto my computer and made several copies (Just in case LOL).  I then took one of those copied folders and renamed it Carrier.

The only thing I changed in the config file was the following:

<uid>[email protected]</uid>  and <name><![CDATA[Carrier]]></name>

I then did the change in the shipping.class.php file I asked you about above - class Carrier {

I uploaded this folder to the module/shipping folder.

When I copied / pasted the array as you said in #6 (after disabling and enabling modules in admin) and bought something in my store, I had not shipping options at all. Nothing showed.

When I left my new Carrier module alone and did nothing with the array it worked like a charm.  All the All in One Shipping wording has been changed to Carrier and the rates show

correctly.  Do you think I'll have any problems later on or do you think everything is ok?

Thanks for all your help,

Claudia

Link to comment
Share on other sites

"When I copied / pasted the array (post #6)"

 

Did these settings show in the "Carrier" module's admin settings screens? That is, was the settings checked before placing an order?

 

"I had not shipping options at all. Nothing showed."

 

Very strange. Unless and until I trace out the code as to why adding this new shipping folder resulted in no shipping options being shown (and when you say, "Nothing showed," I hope you mean everything else but the shipping choices did get displayed -- as opposed to a completely blank white browser window).

 

Please make a few more test purchases so that variations in delivery address, weight, etc can "exercise" the various conditions and zones you have set up. I don't expect any problem, until one shows up.

Link to comment
Share on other sites

When I say nothing showed up I meant when I "pretended" to be a customer.  There was nothing showing for shipping at all after I put in my name and address in the checkout pages.  All the zones and rates showed up in admin, just not in the checkout pages.  If I leave the array as is when I upload the carrier folder everything works.  I have noticed one thing.  I made a purchase as myself as a customer using my credit card.  I used the payment method as credit card using the PayPal Pro mod.  Before in the transaction page in my PayPal account this would show the item I ordered and the shipping i used.  This is one reason I wanted to change to Carrier as it showed Postage: All in One Shipping USPS: Priority I didn't think the All in One Shipping looked very professional.  Anyway, on the test purchase I just made with my credit card it did not break down the order - just showed the total.

Link to comment
Share on other sites

  • 8 months later...

Hi,I have followed this thread and got as far as #6

But the settings will not carry over to the new module.

 

Here's what you can do if you have direct access to the database:

1. Enable the new module. It may be called Shipping (or whatever). Do not worry about making any settings. Click Save. This is in CC6 in "manage plugins."

2. Access your database and find the CubeCart_config table.  I found this in phpMyadmin

3. Find the specific row that has in the 'name' column, "All_In_One_Shipping". Done

4. Copy the contents in the 'array' column. Done

5. Find the specific row that has in the 'name' column, "Shipping". Done

6. Paste what was just copied above, replacing the current contents in the 'array' column. Done

Then back to admin and check the pricing is showing in the new Shipping module, yes the pricing is there, however when I open it I get the information of the general tab, thats nornal, BUT, if I click on the general tab the page goes blank , ie the tabs stay but the general info page is not there.

Next, go to shopping cart, add an item and check out. 

Woops, no shipping pricing is presented. The error reads," The following errors were detected:  

and the rest of the message is generated by me (not sure how, too long ago).

In conclusion, the instructions from Brian are OK, but there seems to be something missing to finalize this.

Any suggestions?

regards Duncan.

 

 

  • Unfortunately there are no suitable shipping methods available for your order. This may be because the total number of items in your order does not fit our packaging or we cannot ship to your country. Please check the number of items such that there is 1,3,6,12,18,24...

 

In CubeCart, bring the Shipping module up for editing. Verify that the zones and conditions appear correct.

Link to comment
Share on other sites

"if I click on the general tab the page goes blank"

This probably because there is a mismatch between general plugin management and tyhe name of the tab in the skin file.

General plugin management will always give a "General" tab that references the folder name of the plugin. That is:

PHP:
$GLOBALS['main']->addTabControl("General", $MODULE['folder']);

HTML:
<div id="Name_of_Folder" class="tab_content">

In the newly named copy of the AIOS module, /skin/admin/index.tpl template, you may need to also edit the first <div id="???" class="tab_content"> to hold the corresponding name of this module's folder.

Link to comment
Share on other sites

In the newly named copy of the AIOS module, /skin/admin/index.tpl template, you may need to also edit the first <div id="???" class="tab_content"> to hold the corresponding name of this module's folder.

Yes, found that and changed ALL_IN_ONE to newly named copy and now the general tab is doing what it should. :)

I changed line 8 and line 55.

However testing the shopping cart provides the same result, ie and error, the same as before.

 

Link to comment
Share on other sites

I do not know what changes to line 55 was to accomplish.

In the newly renamed copy of AIOS module's (Carrier, for example) control panel, enable debug mode.

Test the shopping cart.

Hopefully, this module will display why it did not offer anything of a shipping package.

Link to comment
Share on other sites

When the customer reaches the Checkout (index.php?_a=checkout), the first thing that gets printed is a red border with stuff like:

THIS INFORMATION IS BEING PRINTED BECAUSE : The "Carrier Module" has debug mode enabled.

TO HIDE THIS INFORMATION : Log into Admin and go to Shipping Methods > Carrier then disable the debug setting.

BASKET TOTALS

Basket weight: 4.000
Basket value: 6.99
Basket item count: 1

ADDRESS SUMMARY (*** Note: May be shop location if customer has not provided an address)

And a whole lot more. After that square of info, the regular page one sees during checkout is shown.

If this debug info is not getting sent with the page, then the module is not being seen by CubeCart for some reason.

 

Link to comment
Share on other sites

I wonder what the heck is going on with the `module_id` column? In my CubeCart_modules table, that column's values for already installed records has jumped from the double-digits to the 800's. Yours is up in the 2600's. That's an interesting phenomenon I'll look into later.

What to do next?

We need to trace this out - find out why CubeCart is not finding a folder/file that is presumably appropriately named.

Contact me by email and we will take this offline. (You should have my email address from last May.) No need to bore the others. But we will post the resolution once we find it.

 

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
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...