Jump to content



Photo
- - - - -

free shipping by categories support thread


  • Please log in to reply
38 replies to this topic

#1   magicandmischief182

magicandmischief182
  • Members
  • 181 posts
  • Real Name:Jeffrey Rosen.

Posted 29 June 2009 - 20:32

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!

#2   mylane

mylane
  • Members
  • 49 posts
  • Real Name:Mylane

Posted 01 July 2009 - 04:02

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('"' => '&quot;', '\'' => ''', '<' => '&lt;', '>' => '&gt;')) . '</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 . '&nbsp;&nbsp;');
}
}

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.

Birds with same feathers, are same birds.

#3   dailce

dailce
  • Members
  • 519 posts
  • Real Name:Ilchy
  • Gender:Male

Posted 02 September 2009 - 18:18

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.

#4   dailce

dailce
  • Members
  • 519 posts
  • Real Name:Ilchy
  • Gender:Male

Posted 02 September 2009 - 18:26

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?

#5   dailce

dailce
  • Members
  • 519 posts
  • Real Name:Ilchy
  • Gender:Male

Posted 03 September 2009 - 14:12

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?

#6   argonstudios

argonstudios
  • Members
  • 1 posts
  • Real Name:Shannon Cox

Posted 16 September 2009 - 15:14

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?

#7   bavautoM3

bavautoM3
  • Members
  • 22 posts
  • Real Name:Michael

Posted 09 October 2009 - 01:28

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.

#8   malahhaor

malahhaor
  • Members
  • 1 posts
  • Real Name:Mike

Posted 31 October 2009 - 18:10

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.

#9   lutzieluv

lutzieluv
  • Members
  • 7 posts
  • Real Name:Heike

Posted 18 December 2009 - 17:42

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.

[img]http://shop.robels.com/images/freeshippingpercat.png[/img]

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

#10   graysonhobby

graysonhobby
  • Members
  • 162 posts
  • Real Name:Grayson

Posted 28 December 2009 - 18:17

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.

[img]http://shop.robels.com/images/freeshippingpercat.png[/img]

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?

#11   maxemus

maxemus
  • Members
  • 106 posts
  • Real Name:Raphael Muscarelle
  • Gender:Male

Posted 02 January 2010 - 04:54

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, 02 January 2010 - 04:55.


#12   lutzieluv

lutzieluv
  • Members
  • 7 posts
  • Real Name:Heike

Posted 05 January 2010 - 21:54

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 /sad.gif' class='bbc_emoticon' alt=':(' /> 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

#13   samsagaz

samsagaz
  • Members
  • 27 posts
  • Real Name:Jose

Posted 06 January 2010 - 01:54

Hi,

unfortunately not.

But it also seems there is no support in this thread /sad.gif' class='bbc_emoticon' alt=':(' /> 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!

#14   TCDK

TCDK
  • Members
  • 71 posts
  • Real Name:Torben Christoffersen
  • Gender:Male
  • Location:Ribe, Denmark

Posted 13 January 2010 - 10:30

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, 13 January 2010 - 10:33.


#15   gepir

gepir
  • Members
  • 6 posts
  • Real Name:Standa

Posted 11 March 2010 - 14:22

Hi all,

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

Thanks

#16   bpmcclure

bpmcclure
  • Members
  • 179 posts
  • Real Name:Bruce McClure
  • Gender:Male
  • Location:San Diego, California, USA

Posted 15 March 2010 - 01:52

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

#17   gepir

gepir
  • Members
  • 6 posts
  • Real Name:Standa

Posted 16 March 2010 - 12:28

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

#18   IKWeb

IKWeb
  • Members
  • 12 posts
  • Real Name:Danny

Posted 19 March 2010 - 10:00

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?

#19   smarlar

smarlar
  • Members
  • 6 posts
  • Real Name:Scott Marlar

Posted 22 March 2010 - 14:20

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, 22 March 2010 - 14:23.


#20   Vakondur

Vakondur
  • Members
  • 1 posts
  • Real Name:Kristof

Posted 23 March 2010 - 21:32

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, 23 March 2010 - 21:40.