Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

default select of shipping opt? (not cheapest)


breamillman

Recommended Posts

Any one know how to force a default select of the shipping options when there are more than 1. It is currently set to choose cheapest option - and I don't want that.

I see code in "catalog/checkout_shipping.php"

// if no shipping method has been selected, automatically select the cheapest method. if the modules status was changed when none were available, to save on implementing a javascript force-selection method, also automatically select the cheapest shipping method if more than one module is now enabled  if ( !tep_session_is_registered('shipping') || ( tep_session_is_registered('shipping') && ($shipping == false) && (tep_count_shipping_modules() > 1) ) ) $shipping = $shipping_modules->cheapest();

 

But I tried "expensive" (and a few other words) in place of cheapest & it faulted. (haha) I can't seem to find any other pages referring to it.

 

I need to figure something out since the cheapest method (in this case free) is only available on 1 item. I'm transferring to this store- from a homemade html one in which I had soooooo much more control over shipping options & I'm losing my mind in the process. :blink:

 

 

Also one more question..

Anyone know how to get the product ATTRIBUTES drop downs to automatically alphabetized themselves when displayed on the site? They seem to be random- despite order of entry, etc. I've been staring at and changing code for at least 100 hours in the past week- so I'm probably missing something easy.

 

Any help would be greatly appreciated. This is my first time admitting defeat and asking for help here.

And please let the answer be something other than contribs.. I've spent more time removing contribs- then adding them..

 

thank you thank you thank you

Link to comment
Share on other sites

  • 7 years later...

There is an add-on, if I remember correctly, called product attribute sort.

 

HTH

 

G

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Also one more question..

Anyone know how to get the product ATTRIBUTES drop downs to automatically alphabetized themselves when displayed on the site? They seem to be random- despite order of entry, etc. I've been staring at and changing code for at least 100 hours in the past week- so I'm probably missing something easy.

 

I used AJAX Attribute Manager 2.3 V2.

Link to comment
Share on other sites

In file catalog/product_info.php find the query

 

    $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");

 

and add to the end of it

order by pov.products_options_values_name ASC

 

so it looks like

    $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' order by pov.products_options_values_name ASC ");

 

You can order by following

 

pov.products_options_values_id,

pov.products_options_values_name,

pa.options_values_price

 

and set the order to be ascending (ASC) or descending (DESC)

Link to comment
Share on other sites

Any help with the default shipping question...please?!

 

I have one shipping module (USPS) and 3 options within that module (Express Mail, Priority Mail, and Parcel Post). My system is currently defaulting to the cheapest, but I would like the default to always be Priority Mail, regardless of cost.

 

Thanks for any help you can provide! It is greatly appreciated : )

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...