Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Seperate Pricing Per Customer v3.5


scendent

Recommended Posts

I installed a few new mods, SPPC V4.16 and the mail revision SPPC_4_2_mail_rev1 & sppc_attributes_rev1 on a localhost oscommerce-2.2ms2-060817 test bed.

The new mods work great however, I then noticed that when I add a product to cart and try to delete it by clicking remove and update I get the below error.

I can however click the browser back button and the product is removed.

Can someone point me in the right direction to fix this.

 

Error!

 

Unable to determine the page link!

 

Thanks in advance

 

George

Link to comment
Share on other sites

Can someone point me in the right direction to fix this.

I think this is a pretty generic error. I have never seen it mentioned in connection to SPPC really. Try searching the forums using Google with that phrase ("Unable to determine the page link" site:www.oscommerce.com/forums). There must be dozens of topics containing it (but I never read them, so don't know the answer).

Link to comment
Share on other sites

Thanks for the fast reply :)

I made a new test store with just the SPPC mods and dont get the error so I must have missed it on a diff mod :(

Will hunt it down I hope :)

Link to comment
Share on other sites

Hello Tracy,

 

Thanks for replaying.

 

But in my store/admin , when I click on Customers and then on "BOX_CUSTOMERS_GROUPS" al I see is a blank page.

 

So I can't make different groups.

 

I think there is probably a problem in my Direct Admin.

 

Any help is welcome.

 

Thanks

Lili

Link to comment
Share on other sites

But in my store/admin , when I click on Customers and then on "BOX_CUSTOMERS_GROUPS" al I see is a blank page.

 

So I can't make different groups.

 

I think there is probably a problem in my Direct Admin.

If you see something that only contains capitals like BOX_CUSTOMERS_GROUPS it means a define has not been declared. You must have missed that part when adding SPPC. Normally it is added to the general language file of the language you use in the admin. For example: admin/includes/languages/dutch.php

 

// BOF Separate Pricing Per Customer
define('BOX_CUSTOMERS_GROUPS', 'Customers Groups');
// EOF Separate Pricing Per Customer

If you only see a blank page when you change the url say from .../admin/customers.php to .../admin/customers_groups.php then you need to find out what error is generated. A blank page doesn't tell us anything.

Link to comment
Share on other sites

If you see something that only contains capitals like BOX_CUSTOMERS_GROUPS it means a define has not been declared. You must have missed that part when adding SPPC. Normally it is added to the general language file of the language you use in the admin. For example: admin/includes/languages/dutch.php

 

// BOF Separate Pricing Per Customer
define('BOX_CUSTOMERS_GROUPS', 'Customers Groups');
// EOF Separate Pricing Per Customer

If you only see a blank page when you change the url say from .../admin/customers.php to .../admin/customers_groups.php then you need to find out what error is generated. A blank page doesn't tell us anything.

 

 

Thanks Jan,

 

Yes I have already found that and the code is in all my languages groups such as Dutch, France, ... (copied them from the English version)

 

Still nothing has changed, when I click in my admin/store "customer group" appears a blank screen.

My site seems to work and I can't find any error code.

 

I don't have any Idea what I'm missing.

 

Lili

Link to comment
Share on other sites

Thanks Jan,

 

Yes I have already found that and the code is in all my languages groups such as Dutch, France, ... (copied them from the English version)

 

Still nothing has changed, when I click in my admin/store "customer group" appears a blank screen.

My site seems to work and I can't find any error code.

 

I don't have any Idea what I'm missing.

 

Lili

 

Hi,

 

I have recopied the files and it seems I must of have forgotten something.

Now my "customer group" is working.

 

Now I have to figured out how that a Wholesale customer can see the wholesale price’s.

 

Maybe I will be back with more newbie questions …. Sorry.

 

Best Regards and thanks

Lili

Link to comment
Share on other sites

i am interested in installing this contribution.. it seems to be exactly what i need .. I do custom screen printing and specialize in making band shirts. i would like to be able to give the band members the ability to purchase the shirts on the site at wholesale pricing.

 

my question is .. i've done alot of layout modding to my store.. i havent installed any other contributions yet other than the header tags mod. Will this contrbution change any of my layouts? on any of the pages..

 

 

www.tinygiantclothing.com is the site.. if you need to look

 

 

thanks a bunch.. anxiously waiting an answer :) i can't wait to put this into motion.

 

I am backing up my whole site now and just backed up my database

Link to comment
Share on other sites

my question is .. i've done alot of layout modding to my store.. i havent installed any other contributions yet other than the header tags mod. Will this contrbution change any of my layouts? on any of the pages..

Not on the catalog side. There will be an additional page or 2 in the admin (one popup for the attributes) so that will be different. It has nothing to do with appearance. Sometimes we get a question if they can see a site where SPPC is used but this is a useless question since nothing will show that it is used.

Link to comment
Share on other sites

okay having issues...

 

 

admin side seems to be working .. it killed my main page... the problem lines are in red text in the quotes

 

here is the error:

Fatal error: Cannot redeclare tep_show_category() (previously declared in /home/content/t/i/n/tinygiants/html/includes/header.php:136) in /home/content/t/i/n/tinygiants/html/includes/boxes/categories.php on line 59

 

 

here is header.php lines 134-244

<? // ---- CATEGORIES

 

function tep_show_category($counter) {

global $tree, $categories_string, $cPath_array;

 

if(!$tree[$counter]['level']){

$categories_string .= $categories_string ? '<tr><td colspan=2><img src=images/m21.gif width=195 height=1><br><br class=px3></td></tr>' : '';

 

$categories_string .= '<tr><td width=39 align=center><img src=images/m06.gif width=10 height=10></td><td width=156><a class=ml href=';

 

if ($tree[$counter]['parent'] == 0) {

$cPath_new = 'cPath=' . $counter;

} else {

$cPath_new = 'cPath=' . $tree[$counter]['path'];

}

$categories_string .= tep_href_link('index.php', $cPath_new) . '>';

// display category name

$categories_string .= $tree[$counter]['name'];

$categories_string .= '</a><br><br class=px3></td></tr>';

}else{

$categories_string .= '<tr><td width=39 align=center></td><td width=156>';

 

for($i=0;$i<$tree[$counter]['level'];$i++)

$categories_string .= ' ';

 

$categories_string .= '- <a class=ml href=';

if ($tree[$counter]['parent'] == 0) {

$cPath_new = 'cPath=' . $counter;

} else {

$cPath_new = 'cPath=' . $tree[$counter]['path'];

}

$categories_string .= tep_href_link('index.php', $cPath_new) . '>';

// display category name

$categories_string .= $tree[$counter]['name'];

$categories_string .= '</a><br><br class=px3></td></tr>';

}

 

if ($tree[$counter]['next_id'] != false) {

tep_show_category($tree[$counter]['next_id']);

}

}

 

 

 

define(TABLE_CATEGORIES, "categories");

define(TABLE_CATEGORIES_DESCRIPTION, "categories_description");

$categories_string = '';

$tree = array();

 

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' 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)) {

$tree[$categories['categories_id']] = array('name' => $categories['categories_name'],

'parent' => $categories['parent_id'],

'level' => 0,

'path' => $categories['categories_id'],

'next_id' => false);

 

if (isset($parent_id)) {

$tree[$parent_id]['next_id'] = $categories['categories_id'];

}

 

$parent_id = $categories['categories_id'];

 

if (!isset($first_element)) {

$first_element = $categories['categories_id'];

}

}

 

//------------------------

if ($cPath) {

$new_path = '';

reset($cPath_array);

while (list($key, $value) = each($cPath_array)) {

unset($parent_id);

unset($first_id);

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

if (tep_db_num_rows($categories_query)) {

$new_path .= $value;

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

$tree[$row['categories_id']] = array('name' => $row['categories_name'],

'parent' => $row['parent_id'],

'level' => $key+1,

'path' => $new_path . '_' . $row['categories_id'],

'next_id' => false);

 

if (isset($parent_id)) {

$tree[$parent_id]['next_id'] = $row['categories_id'];

}

 

$parent_id = $row['categories_id'];

 

if (!isset($first_id)) {

$first_id = $row['categories_id'];

}

 

$last_id = $row['categories_id'];

}

$tree[$last_id]['next_id'] = $tree[$value]['next_id'];

$tree[$value]['next_id'] = $first_id;

$new_path .= '_';

} else {

break;

}

}

}

$categories_string .= '';

tep_show_category($first_element);

$categories_string .= '';

 

echo $categories_string;

?>

 

 

 

and now categories.php

 

<?php

/*

$Id: categories.php,v 1.25 2003/07/09 01:13:58 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

function tep_show_category($counter) {

global $tree, $categories_string, $cPath_array;

 

for ($i=0; $i<$tree[$counter]['level']; $i++) {

$categories_string .= "  ";

}

 

$categories_string .= '<a href="';

 

if ($tree[$counter]['parent'] == 0) {

$cPath_new = 'cPath=' . $counter;

} else {

$cPath_new = 'cPath=' . $tree[$counter]['path'];

}

 

$categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">';

 

if (isset($cPath_array) && in_array($counter, $cPath_array)) {

$categories_string .= '<b>';

}

 

// display category name

$categories_string .= $tree[$counter]['name'];

 

if (isset($cPath_array) && in_array($counter, $cPath_array)) {

$categories_string .= '</b>';

}

 

if (tep_has_category_subcategories($counter)) {

$categories_string .= '->';

}

 

$categories_string .= '</a>';

 

if (SHOW_COUNTS == 'true') {

$products_in_category = tep_count_products_in_category($counter);

if ($products_in_category > 0) {

$categories_string .= ' (' . $products_in_category . ')';

}

}

 

$categories_string .= '<br>';

 

if ($tree[$counter]['next_id'] != false) {

tep_show_category($tree[$counter]['next_id']);

}

}

?>

<!-- categories //-->

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_CATEGORIES);

 

new infoBoxHeading($info_box_contents, true, false);

 

$categories_string = '';

$tree = array();

 

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' 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)) {

$tree[$categories['categories_id']] = array('name' => $categories['categories_name'],

'parent' => $categories['parent_id'],

'level' => 0,

'path' => $categories['categories_id'],

'next_id' => false);

 

if (isset($parent_id)) {

$tree[$parent_id]['next_id'] = $categories['categories_id'];

}

 

$parent_id = $categories['categories_id'];

 

if (!isset($first_element)) {

$first_element = $categories['categories_id'];

}

}

 

//------------------------

if (tep_not_null($cPath)) {

$new_path = '';

reset($cPath_array);

while (list($key, $value) = each($cPath_array)) {

unset($parent_id);

unset($first_id);

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

if (tep_db_num_rows($categories_query)) {

$new_path .= $value;

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

$tree[$row['categories_id']] = array('name' => $row['categories_name'],

'parent' => $row['parent_id'],

'level' => $key+1,

'path' => $new_path . '_' . $row['categories_id'],

'next_id' => false);

 

if (isset($parent_id)) {

$tree[$parent_id]['next_id'] = $row['categories_id'];

}

 

$parent_id = $row['categories_id'];

 

if (!isset($first_id)) {

$first_id = $row['categories_id'];

}

 

$last_id = $row['categories_id'];

}

$tree[$last_id]['next_id'] = $tree[$value]['next_id'];

$tree[$value]['next_id'] = $first_id;

$new_path .= '_';

} else {

break;

}

}

}

tep_show_category($first_element);

 

$info_box_contents = array();

$info_box_contents[] = array('text' => $categories_string);

 

new infoBox($info_box_contents);

?>

</td>

</tr>

<!-- categories_eof //-->

Edited by markedfordeath
Link to comment
Share on other sites

i reverted back to my saved site .. glad i did that :)

 

 

pretty much every file that this package changed had issues for some reason.. i really want it to work ..but even following changing the lines with the install instructions vs doing it by upload.. i was still getting tons of errors.

Link to comment
Share on other sites

it seemed everything admin side worked fine.

 

but every page that was customer visble had errors.. like index, specials, login, etc.. all had some sort of error to it..

 

anyone have the time to help me get it working?

 

thanks!

Link to comment
Share on other sites

1054 - Unknown column 'g.customers_groups_price' in 'field list'

 

select g.customers_groups_id, g.customers_groups_name, g.customers_groups_discount, g.customers_groups_price from customers_groups g order by g.customers_groups_id ASC limit 0, 20

 

[TEP STOP]

 

 

I keep getting this error in my admin section when i click groups

 

I tried to get sppc to work yesterday and after a couple hours of constant errors and keeping my site down i decided to undo the changes (uploaded my backup) and decided to move on to another one.

 

i then settled on TotalB2B and i think that maybe something in the mysql from sppc didnt get taken out of the database and is conflicting with the new program..

 

its giving me 1054 errors on any page that displays a product and i cant access the groups on the admin page. ever other option/field works.. i just cant access the groups to create or do anything with them...

 

 

on my product pages i get this error :

1054 - Unknown column 'g.customers_groups_price' in 'field list'

 

select g.customers_groups_price from customers_groups g inner join customers c on g.customers_groups_id = c.customers_groups_id and c.customers_id = '3'

 

[TEP STOP]

 

 

i'm about 6 hours into coding and checking the code and i'm totally lost .. i've done everything i was supposed to :(

 

please please help!

Link to comment
Share on other sites

i'm about 6 hours into coding and checking the code and i'm totally lost .. i've done everything i was supposed to

Well, either you messed up or the contribution instructions were not correct because the error states clearly that a column is missing in the table customers_groups: customers_groups_price. Since this is not a column that is used in SPPC you can't blame SPPC for this one :)

Link to comment
Share on other sites

alright ... i guess thats a help :)

 

 

would you think its something in the database or something in my files?

 

thanks for the reply.. i haven't had one reply over on the totalb2b "support" :-P

Link to comment
Share on other sites

customers_groups_id

customers_groups_name

customers_groups_discount

 

those are the fields in the customer groups section on the mysql

 

 

should their be a customers_groups_price?

Link to comment
Share on other sites

I have been having the following problem on my main store and 2 test stores.

So I set up a completely new blank store using oscommerce-2.2rc2a. and separate_price_421a but still having the same problem

 

When in admin and editing a product and I click on preview button I get the following error.

 

Warning: Variable passed to each() is not an array or object in X:\Catalog\admin\categories.php on line 800

 

I get 13 rows of this on the screen.

 

This is the section of code from admin\Categories.php

 

798 // BOF Separate Pricing per Customer

799 if (!is_array($HTTP_POST_VARS[$key])) {

800 while (list($k, $v) = each($value)) {

801 echo tep_draw_hidden_field($key . '[' . $k . ']', htmlspecialchars(stripslashes($v)));

802 }

803 } else {

804 // EOF Separate Pricing per Customer

 

Can any one please help

Link to comment
Share on other sites

When in admin and editing a product and I click on preview button I get the following error.

 

Warning: Variable passed to each() is not an array or object in X:\Catalog\admin\categories.php on line 800

 

I get 13 rows of this on the screen.

If you used a fresh install, did you use the edited file from the package? It sounds as if you added the code manually and made a small mistake (there are a lot of edits in that file, so that shouldn't come as a surprise).

Link to comment
Share on other sites

If you used a fresh install, did you use the edited file from the package? It sounds as if you added the code manually and made a small mistake (there are a lot of edits in that file, so that shouldn't come as a surprise).

 

Found the misake there was an extra }

The only error line I have now showing is

Warning: mktime(): Windows does not support negative values for this function in X:\admin\includes\functions\general.php on line 130

 

(Line 130 is) return strftime(DATE_FORMAT_LONG, mktime($hour, $minute, $second, $month, $day, $year));

 

It is to do with showing the date and time

 

This product was added to our catalog on .

 

I have remove the code and all seems to work but it would be nice to get this working

Link to comment
Share on other sites

Warning: mktime(): Windows does not support negative values for this function in X:\admin\includes\functions\general.php on line 130

 

(Line 130 is) return strftime(DATE_FORMAT_LONG, mktime($hour, $minute, $second, $month, $day, $year));

According to the PHP website this is a known issue on Windows servers so "Therefore the range of valid years was limited to 1970 through 2038. " Seems hardly relevant to you. What is the value of the datatime that was inserted in the datase that Windows trips on this (should be something like: 2007-07-07 12:13:14)? You would need to use phpMyAdmin or something like that to see that.

Link to comment
Share on other sites

According to the PHP website this is a known issue on Windows servers so "Therefore the range of valid years was limited to 1970 through 2038. " Seems hardly relevant to you. What is the value of the datatime that was inserted in the datase that Windows trips on this (should be something like: 2007-07-07 12:13:14)? You would need to use phpMyAdmin or something like that to see that.

 

Thanks for that.

I will re enable it when I put the site back up on my hosting company as it runs on linux and therefore should sort thisd problem out.

Link to comment
Share on other sites

customers_group_price is in the table products_groups - so if you need that query, change that section of the query to:

 

select pg.customers_group_price from . " TABLE_PRODUCTS_GROUPS " . pg etc...

 

I'm sure this was setup by another contribution - you might want to use a file comparison program (such as WinMerge) to compare your files with the files that come with the SPPC contribution and find your differences ;)

 

I keep getting this error in my admin section when i click groups

 

I tried to get sppc to work yesterday and after a couple hours of constant errors and keeping my site down i decided to undo the changes (uploaded my backup) and decided to move on to another one.

 

i then settled on TotalB2B and i think that maybe something in the mysql from sppc didnt get taken out of the database and is conflicting with the new program..

 

its giving me 1054 errors on any page that displays a product and i cant access the groups on the admin page. ever other option/field works.. i just cant access the groups to create or do anything with them...

 

 

on my product pages i get this error :

 

 

 

i'm about 6 hours into coding and checking the code and i'm totally lost .. i've done everything i was supposed to :(

 

please please help!

~Tracy
 

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...