osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Need help on a quick shipping hack

This is a discussion on Need help on a quick shipping hack within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; So here I come again looking for help... My problem, when a customer gets to pick the shipping method, he ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Customization/Mods

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools
  #1  
Old 08-29-2007, 03:50 AM
MindTwist's Avatar
Active Member
 
Join Date: Jun 2007
Location: Barcelona, Spain
Posts: 338
Thanks: 9
Thanked 26 Times in 25 Posts
Rep Power: 3
MindTwist will become famous soon enoughMindTwist will become famous soon enough
Default Need help on a quick shipping hack

So here I come again looking for help...

My problem, when a customer gets to pick the shipping method, he is seeing the following:


The upper line is the shipping method, the lower line describes it better.

What I would like is for this to stay the same way it is now, but on the DB only add the short name for the shipping method. Like, I would like the customer to see as above, but on the DB table of orders_total the only part that should be added would be "Local pick up (Barcelona)"

Why would I want that? Cosmetic reasons mainly as you can see here:


On check out, the delivery method will take up to 2 lines with all the text, when I would have more than enough with " Local pick up (Barcelona)", I do not need the rest.


On the invoices printed through admin\tools\batch print center, the shipping method will even go over the s&h price. Again, it would not happen if I store only the first part of the text.
(yeah, that is the default template, haven't done mine yet)

I have tried playing with /include/modules/order_total/ot_shipping.php but with no luck, any hints on where and what to change would be great.

Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
  #2  
Old 08-29-2007, 08:18 AM
osCMax Testing Team
 
Join Date: Nov 2002
Location: Orlando
Posts: 212
Thanks: 10
Thanked 26 Times in 14 Posts
Rep Power: 7
JohnW will become famous soon enoughJohnW will become famous soon enough
Default Re: Need help on a quick shipping hack

You can change most of what your shipping page displays in includes/languages/modules/shipping/ the just select the modules you want to change. You can do the same for the payments too.

If you are using the UPS XML there are a couple places in the main file that you can edit out displaying transit time which will reduce that.

In the language/batch_print you can change the font size for that easily.
__________________
John
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 08-29-2007, 09:31 AM
MindTwist's Avatar
Active Member
 
Join Date: Jun 2007
Location: Barcelona, Spain
Posts: 338
Thanks: 9
Thanked 26 Times in 25 Posts
Rep Power: 3
MindTwist will become famous soon enoughMindTwist will become famous soon enough
Default Re: Need help on a quick shipping hack

Hi John,
Yeah, I have already customized my includes/languages/espanol/modules/shipping/ with my information, and that's what is showing above:

-----
define('MODULE_SHIPPING_SPU_TEXT_TITLE', 'Recogida en mano (Barcelona)');
define('MODULE_SHIPPING_SPU_TEXT_WAY', 'El comprador recogera el paquete PREVIO pago por ingreso/transferencia.');
-----

If I just leave it this way:

-----
define('MODULE_SHIPPING_SPU_TEXT_TITLE', 'Recogida en mano (Barcelona)');
define('MODULE_SHIPPING_SPU_TEXT_WAY', '');
-----

The outcome is the following:


And then at the end of checkout and the invoices will come out as I want, with only the small part of the text, but on checkout when the buyer gets to choose the shipping method I would like the extra information to be there (otherwise it will also be kinda ugly, since they will get the shipment method on one line, but they will be picking the price on the following empty line).

Oops, hit submit instead of preview.

Guess that when I make my template for batch print of course I could put that line with smaller font size, but I think that would also be a crappy solution.

Still looking for a good solution, thx!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 08-29-2007, 09:49 AM
MindTwist's Avatar
Active Member
 
Join Date: Jun 2007
Location: Barcelona, Spain
Posts: 338
Thanks: 9
Thanked 26 Times in 25 Posts
Rep Power: 3
MindTwist will become famous soon enoughMindTwist will become famous soon enough
Default Re: Need help on a quick shipping hack

One quick (and cheap/crappy) hack would probably be on /checkout_process.php

-----[checkout_process.php lines 114-121]-----
for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
$sql_data_array = array('orders_id' => $insert_id,
'title' => $order_totals[$i]['title'],
'text' => $order_totals[$i]['text'],
'value' => $order_totals[$i]['value'],
'class' => $order_totals[$i]['code'],
'sort_order' => $order_totals[$i]['sort_order']);
tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array);
----------

This is (I guess and hope) where the info gets added to the orders_total table on the DB. Looking up on the same file, I see:

-----[checkout_process.php lines 55-58]-----
require(DIR_WS_CLASSES . 'order_total.php');
$order_total_modules = new order_total;

$order_totals = $order_total_modules->process();
----------

Which takes me to /includes/classes/order_total.php , but here it gets too complicated for my basic PHP knowledge.
From what I understand, on /includes/modules/order_total/ot_shipping.php I already have all the shipment information toguether. In fact, already on /includes/modules/shipping/spu.php I think both DEFINEs are already toguether, so I do not think I have a way to cleanly remove the extra information from the database, since when I removed it from spu.php it wouldn't either show up at checkout (like on the attached picture on the previous post).

Which takes me to a possible solution I think would work, but I would need some help trying it (next post)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 08-29-2007, 09:56 AM
MindTwist's Avatar
Active Member
 
Join Date: Jun 2007
Location: Barcelona, Spain
Posts: 338
Thanks: 9
Thanked 26 Times in 25 Posts
Rep Power: 3
MindTwist will become famous soon enoughMindTwist will become famous soon enough
Default Re: Need help on a quick shipping hack

I know this is a bad solution and would break as soon as I change the name on some shipping method, but I guess I could change the information on checkout_process.php before I push into to the DB, like:

----------
if 'text' = "Recogida en mano (Barcelona) (El comprador recogera el paquete PREVIO pago por ingreso/transferencia.):"
then
'text' = "Recogida en mano (Barcelona)"
----------

And same thing with the other 2 shipping methods. That should be combined with

-----[checkout_process.php lines 114-121]-----
for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
$sql_data_array = array('orders_id' => $insert_id,
'title' => $order_totals[$i]['title'],
'text' => $order_totals[$i]['text'],
'value' => $order_totals[$i]['value'],
'class' => $order_totals[$i]['code'],
'sort_order' => $order_totals[$i]['sort_order']);
tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array);
----------

So, since I do not quite know yet the PHP syntax I have to use, if anyone can lend me a hand that would be greatly appreciated.

Thx!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Google Earth Hack v1.0 michael_s New osCommerce Contributions 0 05-09-2007 12:50 PM
QT Pro STS hack michael_s New osCommerce Contributions 0 04-15-2007 02:06 AM
QT Pro STS hack michael_s New osCommerce Contributions 0 04-13-2007 08:00 AM
City Tax Rate Hack for MS1 michael_s New osCommerce Contributions 0 03-27-2007 07:11 AM
Hermes Hack michael_s New osCommerce Contributions 0 03-06-2007 11:50 PM


All times are GMT -8. The time now is 04:56 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax