Latest News: (loading..)
magicandmischief182

free shipping by categories support thread

39 posts in this topic

I just added the free shipping by categories: http://addons.oscommerce.com/info/4475

and I'm getting this error

"Call to undefined function tep_draw_pull_multiselect_menu() in /home/alex/public_html/oscommerce/admin/includes/functions/general.php on line 1411"

when I tried to edit the properties from the admin side.

 

Any help would be grateful!

Thanks!

Share this post


Link to post
Share on other sites

The package include the function-to-add-if-installing.txt....the instruction are there.

 

 

add to (if you dont have such function)

catalog\includes\functions\general.php

 

function tep_get_categories_name($cID, $language = ''){

global $languages_id;

if (!tep_not_null($language))

$language = $languages_id;

 

$cname = tep_db_fetch_array(tep_db_query('select categories_name from '.TABLE_CATEGORIES_DESCRIPTION.' where categories_id="'.$cID.'" and language_id="'.$language.'"'));

 

return $cname['categories_name'];

}

 

 

add to admin/includes/functions/html_output.php

 

function tep_draw_pull_multiselect_menu($name, $values, $defaults, $parameters = '') {

$field = '<select multiple name="' . tep_output_string($name) . '"';

 

if (tep_not_null($parameters)) $field .= ' ' . $parameters;

 

$field .= '>' . "\n";

 

if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]);

 

for ($i = 0, $n = sizeof($values); $i < $n; $i++) {

$field .= '<option value="' . tep_output_string($values[$i]['id']) . '"';

if (in_array($values[$i]['id'], $defaults)) {

$field .= ' SELECTED';

}

 

$field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';

}

$field .= '</select>';

 

return $field;

}

 

add to admin/includes/functions/general.php

 

function tep_get_categories($categories_array = '', $parent_id = '0', $indent = '') {

global $languages_id;

 

if (!is_array($categories_array)) $categories_array = array();

 

$categories_query = tep_db_query("select c.categories_id, cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where parent_id = '" . (int)$parent_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");

while ($categories = tep_db_fetch_array($categories_query)) {

$categories_array[] = array('id' => $categories['categories_id'],

'text' => $indent . $categories['categories_name']);

 

if ($categories['categories_id'] != $parent_id) {

$categories_array = tep_get_categories($categories_array, $categories['categories_id'], $indent . '  ');

}

}

 

return $categories_array;

}

 

//allows selecting many categories a ta time

function tep_cfg_select_multicategories($key_value = '', $key) {

if (tep_not_null($key_value))

$value_array = explode(', ',$key_value);

else

$value_array = array();

 

$name = ((tep_not_null($key)) ? 'configuration[' . $key . ']' : 'configuration_value').'[]';

 

$string = tep_draw_pull_multiselect_menu($name,tep_get_categories(), $value_array,' size="8" ');

 

return $string;

}

 

function tep_cfg_show_multicategories($key_value = ''){

global $languages_id;

 

$cat_str = '';

 

if (tep_not_null($key_value)){

$value_array = explode(', ',$key_value);

for($i=0, $x=sizeof($value_array); $i<$x; $i++){

$cat_str .= tep_get_category_name((int)$value_array[$i], $languages_id).', ';

}

$cat_str = substr($cat_str, 0, -2);

}

 

return $cat_str;

}

 

 

 

 

FILE:

admin\modules.php

find:

 

case 'save':

while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) {

 

after it add:

( only if you don't have such piece of code )

 

if( is_array( $value ) ){

$value = implode( ", ", $value);

$value = ereg_replace (", --none--", "", $value);

}

 

install in admin, make some configuration work (see help there).

thats all.

Share this post


Link to post
Share on other sites
I just added the free shipping by categories: http://addons.oscommerce.com/info/4475

and I'm getting this error

"Call to undefined function tep_draw_pull_multiselect_menu() in /home/alex/public_html/oscommerce/admin/includes/functions/general.php on line 1411"

when I tried to edit the properties from the admin side.

 

Any help would be grateful!

Thanks!

 

 

I had the same error, but realized that I updated the wrong files. Careful, you may have done the same, make sure you update the admin files and catlog files as needed.

Share this post


Link to post
Share on other sites

I've tested this contribution, seems to be working quite well.

 

However, I noticed one problem I'm trying to fix.

 

I have products in CAT1, and CAT1 offers free shipping for all products in CAT1 - Works great.

 

However, I can't get Free shipping to work if I link a product to CAT1. For instance, I want to copy an existing product by linking it from CAT2 to CAT1, but the free shipping for this product won't work if I do this. If I create a "Duplicate" product from CAT2 to CAT1 it works, but I'd like to be able to create the "linked" product.

 

Any ideas?

Share this post


Link to post
Share on other sites
I've tested this contribution, seems to be working quite well.

 

However, I noticed one problem I'm trying to fix.

 

I have products in CAT1, and CAT1 offers free shipping for all products in CAT1 - Works great.

 

However, I can't get Free shipping to work if I link a product to CAT1. For instance, I want to copy an existing product by linking it from CAT2 to CAT1, but the free shipping for this product won't work if I do this. If I create a "Duplicate" product from CAT2 to CAT1 it works, but I'd like to be able to create the "linked" product.

 

Any ideas?

 

 

Ok, I narrowed it down to this bit of code

 

if ( MODULE_SHIPPING_FREECATS_ONLY_OR_ANY == 'Only' ){		
//check if product id exist elsewhere except free cats
$check_query = tep_db_query('select * from '.TABLE_PRODUCTS_TO_CATEGORIES.' where categories_id not in ('.MODULE_SHIPPING_FREECATS_CATEGORIES.') and products_id in ('.$pID_list.')');
if (tep_db_num_rows($check_query)){
	$is_free = false;
}
}

 

Basically if you have Only selected then it checks if product id exist elsewhere except free cats.

Just need to write it to say, check if all products are in FREECATS

 

How?

Share this post


Link to post
Share on other sites

dalice or anyone,

 

I am using the free shipping by categories in os commerce. My client wants to offer free shipping to only one cat. The problem I am having is if I only have a product in the cart from that cat, it will show the shipping option for table rate which is being used for the other products. Does any know how to hide table rate when only free category is present? There is an option for "FREE" and then "Table Rate" shipping costs. Obviously, if you are ordering something and it is offering you free shipping, why would you choose to pay, but I am almost sure that someone will choose the paid shipping option. If the scenario is reversed and there are products in the cart that aren't in the free cat, then no free shipping is offered.

 

Any suggestions?

Share this post


Link to post
Share on other sites

dalice or anyone,

 

I am using the free shipping by categories in os commerce. My client wants to offer free shipping to only one cat. The problem I am having is if I only have a product in the cart from that cat, it will show the shipping option for table rate which is being used for the other products. Does any know how to hide table rate when only free category is present? There is an option for "FREE" and then "Table Rate" shipping costs. Obviously, if you are ordering something and it is offering you free shipping, why would you choose to pay, but I am almost sure that someone will choose the paid shipping option. If the scenario is reversed and there are products in the cart that aren't in the free cat, then no free shipping is offered.

 

Any suggestions?

 

I installed this and all was good except for selecting the category in the admin. When I choose a category then test by adding a product from that category that gets free shipping, I get an error message about category Array. Seems that when I choose a category in the admin and click update. All settings are updated in the database but the value the category is Array, not the actual category ID. If I go into the database and change the value Array in that field to the actual category ID then the checkout works and gives me the option to choose between paying for shipping(which doesn't make sense, it shouldn't even be there to choose) but free shipping is there too and I'm sure the customer is going to choose that if its displayed. The sort order doesn't seem to be working either because I chose this shipping module to be sort order 0 and flat rate shipping to be sort order 1 but flat rate shipping is still showing up first.

Share this post


Link to post
Share on other sites

Hi guys, i've installed this as well and am having a different issue.

I've checked and double checked all files, seems to be good. Installed in admin, but it's not showing up in the shopping cart for the customer. I have one page checkout cart. other methods show up fine, not this one. i've tried different cats, and tried turning cats off, and nothing.

Help please.

Share this post


Link to post
Share on other sites

Hi,

 

I just installed this contrib, but I have these problems:

 

1)I need to offer additional shipping methods, but I can not choose free shipping per category if there are any other methods offered.

 

freeshippingpercat.png

 

2)If I order an item from a category with no free shipping, free shipping should not be offered anymore. But it always shows up, even if I can not choose it (see no. 1).

 

Any ideas?

 

Thanks for your replies.

 

Heike

Share this post


Link to post
Share on other sites

Hi,

 

I just installed this contrib, but I have these problems:

 

1)I need to offer additional shipping methods, but I can not choose free shipping per category if there are any other methods offered.

 

freeshippingpercat.png

 

2)If I order an item from a category with no free shipping, free shipping should not be offered anymore. But it always shows up, even if I can not choose it (see no. 1).

 

Any ideas?

 

Thanks for your replies.

 

Heike

 

 

I am having the same issues. Have you found a solution?

Share this post


Link to post
Share on other sites

dalice or anyone,

 

I am using the free shipping by categories in os commerce. My client wants to offer free shipping to only one cat. The problem I am having is if I only have a product in the cart from that cat, it will show the shipping option for table rate which is being used for the other products. Does any know how to hide table rate when only free category is present? There is an option for "FREE" and then "Table Rate" shipping costs. Obviously, if you are ordering something and it is offering you free shipping, why would you choose to pay, but I am almost sure that someone will choose the paid shipping option. If the scenario is reversed and there are products in the cart that aren't in the free cat, then no free shipping is offered.

 

Any suggestions?

 

Did you ever get the other shipping methods to hide? I'm in need of the same

Edited by maxemus

Share this post


Link to post
Share on other sites

I am having the same issues. Have you found a solution?

 

Hi,

 

unfortunately not.

 

But it also seems there is no support in this thread :( If you look at the last entries there is never an answer of the author of this contrib. There is only one answer to the first question from somebody else.

 

Regards,

Heike

Share this post


Link to post
Share on other sites

Hi,

 

unfortunately not.

 

But it also seems there is no support in this thread :( If you look at the last entries there is never an answer of the author of this contrib. There is only one answer to the first question from somebody else.

 

Regards,

Heike

 

imhaving the same problem too, lets try to fix it!

Share this post


Link to post
Share on other sites

I've just installed this contrib.

 

It show without any errors in the admin, but when I order at product from the choosen category, it dosen't show as a shipping option at all.

 

Any with the same problem?

 

Im using RC2.2

Edited by TCDK

Share this post


Link to post
Share on other sites

Hi all,

 

is it possible use this contrib to add shipping weight for category?

 

Thanks

Share this post


Link to post
Share on other sites

Hi I am having similar issues with this contribution. I installed v1.2 as I did not need Google support or the other newer features. Everything looks fine in admin, but when I set up the category to be free, it does not save when I the module. Hence I never get that option available. If I select to show the text, it shows it, but no category is listed and no radio button shows.

 

Any one got this working, and can someone give me a hint of where to start looking?

 

Thanks,

 

Bruce

Share this post


Link to post
Share on other sites

Hello all,

 

is it possible modify this module? It's for free shipping by category and I need add weight by category.

example:

customer make order shipping and handling is $38 and weight is for example around 500grams

 

and

 

with this modified module will be some-like this:

 

customer make order shipping and handling is $38 weight 500grams + this product is in category 1 and there is weight 1500grams so total weight will be 2000grams and total sum will be for example $42.

 

can you help me?

 

Thanks

Share this post


Link to post
Share on other sites

I have found this addon

 

http://addons.oscommerce.com/info/4475

 

Which gives free shipping depending if you select a category. I have installed this in the admin area. I then get the settings show to the right hand side of the page, i then select the edit function and it clears this of the page and i am not able to make any changes? can anyone help?

Share this post


Link to post
Share on other sites

I have the same problem on a newier version "RC 2.2a" but the shipping module works fine on an older installaion of of RC 2.2 based off a 1.1 template.

 

I have found this addon

 

http://addons.oscommerce.com/info/4475

 

Which gives free shipping depending if you select a category. I have installed this in the admin area. I then get the settings show to the right hand side of the page, i then select the edit function and it clears this of the page and i am not able to make any changes? can anyone help?

Edited by smarlar

Share this post


Link to post
Share on other sites

I had the same error, but realized that I updated the wrong files. Careful, you may have done the same, make sure you update the admin files and catlog files as needed.

 

I have same error on admin side when i trying edit module after installation.

Fatal error: Call to undefined function tep_draw_pull_multiselect_menu() in /home2/fitducom/public_html/admin/includes/functions/general.php on line 1339

 

i hope worked all step good:

my /home2/fitducom/public_html/admin/includes/functions/general.php from the line 1339 :

$string = tep_draw_pull_multiselect_menu($name,tep_get_categories(), $value_array,' size="8" ');

 

return $string;

}

 

function tep_cfg_show_multicategories($key_value = ''){

global $languages_id;

 

$cat_str = '';

 

if (tep_not_null($key_value)){

$value_array = explode(', ',$key_value);

for($i=0, $x=sizeof($value_array); $i<$x; $i++){

$cat_str .= tep_get_category_name((int)$value_array[$i], $languages_id).', ';

}

$cat_str = substr($cat_str, 0, -2);

}

 

return $cat_str;

}

 

 

 

?>

 

 

 

Sorry for bad english

 

Thank You for help

Edited by Vakondur

Share this post


Link to post
Share on other sites

hi,

 

first, please excuse my english, I hope I can discribe my problem that you will understand it :-)

 

I have installed this contrib and have following problem:

I'm selling ebooks(pdf) and goods.

further I'm working with worldzones by price and have graduaded mail fees.

If somebody now has a mixed basket, with goods and ebooks, I thought, that this contrib

will deduct the price of the ebooks (the cat is choosen as free shipment in the modul)

and mail fee will be calculated only for the deducted order amount.

 

but this will not work. the shop calculates the fees for the total amount, apart from my

settings in the modul.

 

maybe somebody can help? is this the correct contrib for me?

 

thank you very much in advance!!

simone

Edited by rabbiti

Share this post


Link to post
Share on other sites

I found this problem and thought it may help some others. I have a variety of addons installed and this free shipping addon seemed to work fine until I went to edit a customer's order via the admin. That's when I got a blank page. The problem was ultimately traced to the fact that an entry needed to be added to admin\includes\functions\general.php similar to what was required on the other side in the same funtion name "function tep_get_categories_name".

Share this post


Link to post
Share on other sites

Hi;

 

I have this contrib installed but have run into a snag. I also have Order Editor installed

and am now receiving this error when I try to manually edit an order :

 

Fatal error: Call to undefined function: tep_get_categories_name() in /home/content/l/a/d/ladykdelights/html/catalog/includes/modules/shipping/freecats.php on line 80

 

Does any one know of a fix for this? Any help would be most appreciated :)

Share this post


Link to post
Share on other sites

I got the same issues when I trying to use this add on with order edit function.

Share this post


Link to post
Share on other sites

I posted later in this thread with a problem. It all works now, except one thing.

 

I cannot select as many categories as we have in our store.

 

How can I make it possible to select categories, without any limits?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now