Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Seperate Pricing Per Customer v3.5


scendent

Recommended Posts

Hi- I was working from a completely clean install of 2.2ms2 with all of the test data removed and 2 of my own products added. Tried to add v3.5 and it seemed fine (though the groups never did show up in my catalog either in the public or admin view) until I got to this:

 

 

admin/includes/database_tables.php

 

Around line 57

 

After:

 

define('TABLE_WHOS_ONLINE', 'whos_online');

define('TABLE_ZONES', 'zones');

 

Add:

 

define('TABLE_PRODUCTS_GROUPS', 'products_groups');

 

I have the database_tables files so that was no problem but once I added this piece of code I got the error message on the admin end as follows:

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/owdg/public_html/catalog/admin/includes/database_tables.php:62) in /home/owdg/public_html/catalog/admin/includes/functions/sessions.php on line 67

 

 

And on the public end:

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/owdg/public_html/catalog/includes/database_tables.php:63) in /home/owdg/public_html/catalog/includes/functions/sessions.php on line 67

 

I went ahead and finished the mod thinking it might need a later bit of code but there is still no difference on the backend showing there are separate groups and the error message is still there. I only added the mod as far as the first part (up to the point where it says "***STOP HERE*******The rest of this mod is only needed if you"... I didn't need it so didn't add it). After reading through I didn't see any posts where someone had already encountered this (though I did try removing my two test items as I saw where that helped someone else) and I would really appreciate any suggestions-

The test site is here: http://www.oldewillowstitchery.com/catalog/

Quin

Link to comment
Share on other sites

She would rather I just got it up and running and then try to get this mod working so while I'd still like to get input from anyone who might have an idea it won't be a clean install and I'm removing this mod now- thanks though!

Link to comment
Share on other sites

She would rather I just got it up and running and then try to get this mod working so while I'd still like to get input from anyone who might have an idea it won't be a clean install and I'm removing this mod now- thanks though!

Quin,

 

Thanks for writing. That is a very interesting problem, indeed. The error message is saying that PHP can not send any HTTP headers back to the browser because content has already been sent by one of your files -- /home/owdg/public_html/catalog/admin/includes/database_tables.php:62

 

The HTTP headers need to be sent BEFORE any text or HTML is sent to the browser.. that is how the protocol works.

 

SO, to fix the problem, you need to look in that file for any text, which could be as simple as a space or even a blank line, outside of the <?php and ?> tags. If you are editing on your PC and uploading, try sending the file up in ASCII mode instead of BINARY and even the other way around. Just be sure there is no extra text in that file.

 

Let me know,

 

-Scott

Link to comment
Share on other sites

Hello Boys/Girls

 

This is my first time posting here, and i'm really pleased to see how much can made a free comunity as you, spending hours on programming and hours teaching, i hope to hekp for you too as soon as my learning goes better :D :D

 

About MS OSC 2.2 M 2 and Prices per groups 3.5

 

i have just installed till "STOP HERE" words in the installation readme file, and i have the same error/bug when i press in any sub-categorie as Mouses in the examples i havent the right prices shown on the mouses products list, i have logged an user which has wholesaler prices and doesnt show the right prices.

 

When added to cart it works fine, but never on product info or product lists in the subcategory.

 

Anybody knows if there are any working version of osc 2.2 ms 2 with this mod installed :P any url?? any idea for resolve my problem??

 

Thanks to all for your time

 

My best wishes to all

 

Miguel

Coast of sun

Malaga-Spain

Link to comment
Share on other sites

Thank you! I had actually taken a space out that I shouldn't have and then in categories.php I should have removed an extra } at

A few lines after, delete or comment out:

 

}

$languages = tep_get_languages();

for ($i=0; $i<sizeof($languages); $i++) {

  echo tep_draw_hidden_field('products_name[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_name[$languages[$i]['id']])));

  echo tep_draw_hidden_field('products_description[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_description[$languages[$i]['id']])));

  echo tep_draw_hidden_field('products_url[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_url[$languages[$i]['id']])));

or I ended up with a parse error- looks like it's running now though!

 

Quin

Link to comment
Share on other sites

Thank you! I had actually taken a space out that I shouldn't have and then in categories.php I should have removed an extra } at

A few lines after, delete or comment out:

 

}

$languages = tep_get_languages();

for ($i=0; $i<sizeof($languages); $i++) {

  echo tep_draw_hidden_field('products_name[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_name[$languages[$i]['id']])));

  echo tep_draw_hidden_field('products_description[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_description[$languages[$i]['id']])));

  echo tep_draw_hidden_field('products_url[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_url[$languages[$i]['id']])));

 

or I ended up with a parse error- looks like it's running now though!

 

Quin

Link to comment
Share on other sites

i have the same error/bug when i press in any sub-categorie as Mouses in the examples i havent the right prices shown on the mouses products list, i have logged an user which has wholesaler prices and doesnt show the right prices.

 

When added to cart it works fine, but never on product info or product lists in the subcategory.

Hello Miguel,

 

There are a lot of sites running this module without any problems. It is a BIG module to install, so a lot of people run into problems, missing small bits of code, etc.

 

I would suggest double checking that you made the correct changes to the following files:

 

catalog/includes/modules/product_listing.php

catalog/product_info.php

catalog/includes/functions/general.php

 

-Scott

Link to comment
Share on other sites

Separate pricing per customer is a really useful contribution.

 

I've been trying to use it together with price-break...but's it's getting pretty complicated combining multiple pricing for a product as well as for multiple customer groups.

 

Has anyone else tried this out?

Link to comment
Share on other sites

Any news on latest version? With the ability to assign different products to different customer groups?

 

Cant wait to use it, it'll be awesome!

 

cheers

Link to comment
Share on other sites

Thanks Scot, but

 

Why i havent "$select_string .= '>';" on my catalog/includes/functions/general.php

 

Maybe i'm using another osc version? Those changes as the readme.txt says is on catalog not on admin.

 

I'm a bit lost :unsure:

 

Thanks ;)

Edited by MikeOne
Link to comment
Share on other sites

Thanks Scot, but

 

Why i havent "$select_string .= '>';" on my catalog/includes/functions/general.php

 

Maybe i'm using another osc version? Those changes as the readme.txt says is on catalog not on admin.

 

I'm a bit lost :unsure:

 

Thanks ;)

Miguel,

 

You are doing fine. The changes that you quoted ARE FOR the ADMIN/includes/functions/general.php.

 

The section ABOVE that in the mod file is for CATALOG/includes/functions/general.php

 

Look carefully at the mod again; it is a big one and easy to get lost into.

 

-Scott

Link to comment
Share on other sites

Has anyone gotten this to work with the batch_print mod? I've been trying but no luck so far- the only file they have in common is the english.php but in the case of batch_print you are replacing the original rather than modifying it and I've not had time to go through both and compare.

Link to comment
Share on other sites

Scendent, any word on the updated mod? I've been holding off on installing this until you have the lastest and greatest ready to go.

 

Also, for anyone else that might read this. Is there an Admin mode where I can create a user that can modify Stock and do the Reports only?

 

Thanks for any and all help!

Link to comment
Share on other sites

Heagar had a problem when he added different special prices to the same product, for exemple one special price for retail and one special price for friends.

 

For every special price, he had a duplication of the product in the product_listing. The solution is not in function/general.php nor in modules/product_listing.php...

 

He just has to modify the sql requests in catalog/index.php.

 

 

for example:

 

 

$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id and s.customers_group_id = '" . $customer_group['customers_group_id'] . "' where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";

 

Of course, he must first define the value of "customer_group":

 

global $customer_id;

$customer_group_query = tep_db_query("select customers_group_id from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'");

$customer_group = tep_db_fetch_array($customer_group_query);

 

 

Thank you for this nice contribution!

 

FX

Link to comment
Share on other sites

Hi, I have just done what I believe to be a clean install of Osc 2.2ms2, that is I removed the folder catalog from htdocs and replaced it with the original catalog folder complete with the install folder.

 

I have worked through the installation procedure and all seems well.

When I type in

http://localhost/catalog

in the browser the welcome page opens up with the original categories, hardware software and DVD movies.

 

I am intending to install Separate Pricing per Customer v3.5 and then Quantity Price Breaks Per Product and have managed so far to make the changes to the customers table and create the products group table in my products database however I can't work out how to link this new catalog to my products database.

 

Could someone point me in the right direction here please?

Link to comment
Share on other sites

I have gone ahead with the installation of Seperate Pricing per Customer v3.5. I have made the changes to the database and all the file changes up to "***STOP HERE******".

the location of the changes was around the same place as described except one in admin/customers.php instead of finding the code around line 430 I found it at 715

my version $Id: customers.php,v 1.82 2003/06/30 13:54:14 dgw_ Exp $

 Around line 430

After:

echo tep_draw_hidden_field('customers_newsletter');
 } else {
   echo tep_draw_pull_down_menu('customers_newsletter', $newsletter_array, (($cInfo->customers_newsletter == '1') ? '1' : '0'));
 }
?></td>
         </tr>

Add:

<tr>
 <td class="main"><?php echo ENTRY_CUSTOMERS_GROUP_NAME; ?></td>
 <td class="main"><?php echo tep_draw_input_field('customers_group_name', $cInfo->customers_group_name, 'maxlength="25"'); ?></td>
</tr>
<tr>
 <td class="main"><?php 
 $index = 0;
 echo ("Existing Groups: ");
 while ($existing_customers =  tep_db_fetch_array($existing_customers_query)) {
   echo ($existing_customers['customers_group_name']);
   echo (", ");
   ++$index;
   if ($index%10 == 0) {
   echo (" ");
   }
 }?>
 </td>
</tr>

 

It appears to be OK except when I look at Customers in admin there is no change in the Customer fields to edit. Am I in the right place to edit the group name?

Also along the same lines where do I edit the price for the customer group?

Link to comment
Share on other sites

OK... Now let's see if I can post this to the RIGHT forum this time, LOL!!

 

 

I have run into the following problem:

 

To start with, I have the EXACT same code on the same site with the subdirectory of catalog for my main store. Now I want to create another store on the same domain with the subdirectory of supplies. It's all installed and working fine EXCEPT when you visit the supply page I get the following error:

 

1054 - Unknown column 'customers_group_id' in 'where clause'

 

select specials_new_products_price from specials where products_id = '85' and status and customers_group_id = 0

 

[TEP STOP]

 

Now when I try to visit the actual categories I get:

 

1054 - Unknown column 'customers_group_id' in 'where clause'

 

select specials_new_products_price from specials where products_id = '72' and status and customers_group_id = 0

 

[TEP STOP]

 

Now what could the problem be? The coding is the same, I have installed ALL the additional SQL additions I need to. I'm ready to pull my hair out.

 

If anyone wants the URL to take a look it's here:

 

http://www.unycornesdreams.com/supplies

 

ANY help would be greatly appreciated!

 

Thanks in advance!

Heather

Edited by 3JCBEnterprises
Link to comment
Share on other sites

It appears to be OK except when I look at Customers in admin there is no change in the Customer fields to edit. Am I in the right place to edit the group name?

Also along the same lines where do I edit the price for the customer group?

If you do not have a new field, called 'customer group' on your admin/customers screen, then please verify you have made all of the changes to admin/customers.php.

 

Once you have that ability, make sure you have at least one customer in each of the groups you would like to have. i.e. a customer in Wholesale and one in Retail.

 

Then you can edit a product and you should have a field for each group where you can add in the price.

 

-Scott

Link to comment
Share on other sites

scendent any updates on the new release?

 

 

Eagerly awaiting :D

Fiscus, and others, I appreciate your patience and understand your eagerness for the new version. I have been swamped with other tasks and have not been able to devote the time needed to get the new mod working. Please know that I have a paying customer waiting for some of these updates too! LOL that will help it move along. :D

Link to comment
Share on other sites

1054 - Unknown column 'customers_group_id' in 'where clause'

 

select specials_new_products_price from specials where products_id = '85' and status and customers_group_id = 0

 

[TEP STOP]

 

Heather,

 

The error is from MySQL and it is saying that the column is NOT THERE. I would double check your tables to be sure all of the SQL/database changes you made took OK. specifically on the specals table.

 

Also make sure that your configuration is pointing to the correct database (the one you are testing, not the old one).

 

-Scott

Link to comment
Share on other sites

For catalog/includes/functions/general.php changes the instructions say that :

 

Around 200



After



? ?$select_string .= '>';



Add .......

 

 

But "$select_string .= '>';" is only in admin/includes/functions/general.php

g'day scott, and everyone.

 

how to go over to handle this? can anyone help..

 

Thanks in advance.

 

michael

Link to comment
Share on other sites

For catalog/includes/functions/general.php changes the instructions say that :

Michael,

 

Looking at the install.txt, line 822 (the lines you quoted) are for the admin/includes/funcitons/general.php . Make sure you are looking at version 3.5 of the install. :)

 

-Scott

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...