Jump to content
scendent

Seperate Pricing Per Customer v3.5

Recommended Posts

Hi all,

 

Jan Zonjee/ Carlost / Meira / please note!

 

 

I have the same problem as Meira after installing SSPC 4.1. on a mod site (mods. includes PWA,CCGV,Multiproducts,easypoplulate

 

In admin/customer.php panel, I get error:

1146 - Table 'smoothgift_com_-_main.TABLE_CUSTOMERS_GROUPS' doesn't exist

select customers_group_id, customers_group_name from TABLE_CUSTOMERS_GROUPS order by customers_group_id

[TEP STOP]

Note: customer table is though visible and correctly loaded even with the RA red button! but you cannot edit your customer.

 

In admin/customers_groups.php, I get error:

Groups

1146 - Table 'smoothgift_com_-_main.TABLE_CUSTOMERS_GROUPS' doesn't exist

select count(*) as total from TABLE_CUSTOMERS_GROUPS g

[TEP STOP]

Note: table is not loaded and you cannot edit your customer for group allocation or anything else.

 

And in admin/categories.php (where you upload/edit products), I get error:

1146 - Table 'smoothgift_com_-_main.TABLE_CUSTOMERS_GROUPS' doesn't exist

select customers_group_id, customers_group_name from TABLE_CUSTOMERS_GROUPS where customers_group_id != '0' order by customers_group_id

[TEP STOP]

 

Everythings else works fine and I am just wondering (since the error messages generated are quite consistent) whether customers_groups.php is creating table_customers_groups (which is needed to further process group pricing)

 

I have read this SSPC thread (almost wholly, large as it is!) and I have seen people requesting help with similar errors in their SSPC installations a couple of times, but no answers visible - and please correct me if 'am wrong or point me in the right direction.

 

This goes without saying that I admirer the dedication and support of the team who put this together. I have read so much of their responses that I felt relunctant and ashamed to hassle them anymore than necessary with my inability to sort this out. Jan Zonjee, respect and keep up the good work!

 

Suggestions or finger pointing to the right place will be appreciated. Thanks!

 

Rich

Share this post


Link to post
Share on other sites

Rich,

Suggestions or finger pointing to the right place will be appreciated. Thanks!
My first suggestion would be to look at admin/includes/database_tables.php and see if the names of the new tables have been added to this file.

 

Meira found out that she was trying to install this contribution on osC 2.2 milestone 1, so that explained the myriad of errors.

Share this post


Link to post
Share on other sites
Rich,

My first suggestion would be to look at admin/includes/database_tables.php and see if the names of the new tables have been added to this file.

 

Meira found out that she was trying to install this contribution on osC 2.2 milestone 1, so that explained the myriad of errors.

Jan,

 

Many Thanks for your response. I was afraid you would be getting tired by now! I guess Meira position is not comparable to mine then. I would like to take this opportunity to personally say saludo! for the contribution andyour ever sustainable forum support. Jongen, jij bent gewoon fantastisch!

 

Both 'customers_groups' and 'products_groups' are defined in both admin/includes/database_tables.php and includes/database_tables.php respectively.

 

Rich

Share this post


Link to post
Share on other sites

Rich,

Both 'customers_groups' and 'products_groups' are defined in both admin/includes/database_tables.php and includes/database_tables.php respectively.
Bedankt voor de complimenten.

 

I now see that your table name is: smoothgift_com_-_main.TABLE_CUSTOMERS_GROUPS. Somebody had an error once in one of the functions that builds the tables with prices that are used in product_listing/index. This was caused by the dash "-" in his mysql table name. He needed to put backticks ( `) around the table name in the function to avoid that problem. Sorry, don't have the time now to search in the topic for that. Perhaps there is a mention of it in the changelog text that came with the package.

 

A bit strange that everything else works fine then :huh:

Share this post


Link to post
Share on other sites
Rich,

Bedankt voor de complimenten.

 

This was caused by the dash "-" in his mysql table name. He needed to put backticks ( `) around the table name in the function to avoid that problem.

 

A bit strange that everything else works fine then :huh:

 

Jan,

Graag gedaan.

 

Are you like refering to the `" . DB_DATABASE . "`" in includes/functions/database.php. If that's the one you mean then all my . DB_DATABASE . in that file are tagged.

 

Everything else works: in the sense that I do not encounter errors accessing catalog/index - site is live, other functions such as log-in, products info, new customers are working. Only the admin/customers, admin/customers_groups and admin/categories are messed up.

 

Is table_customers_groups supposed to be created in smoothgift_com_-_main.CUSTOMERS_GROUPS? I get no search result if I run the CUSTOMERS_GROUPS query just like you will get a list of your customers if you run the Customers query. Is that normal?

Share this post


Link to post
Share on other sites
Is table_customers_groups supposed to be created in smoothgift_com_-_main.CUSTOMERS_GROUPS? I get no search result if I run the CUSTOMERS_GROUPS query just like you will get a list of your customers if you run the Customers query. Is that normal?
No, that is not normal. The sql for creating that table is:

DROP TABLE IF EXISTS customers_groups;
CREATE TABLE customers_groups (
customers_group_id smallint UNSIGNED NOT NULL,
customers_group_name varchar(32) NOT NULL default '',
customers_group_show_tax enum('1','0') NOT NULL,
customers_group_tax_exempt enum('0','1') NOT NULL,
group_payment_allowed varchar(255) NOT NULL default '',
group_shipment_allowed varchar(255) NOT NULL default '',
PRIMARY KEY (customers_group_id)
);

INSERT INTO customers_groups VALUES('0','Retail','1','0','','');

It is a small table that holds the info on the customer groups like id and name. By default there should be one row with Retail when the sql is finished. Could it be that the sql run failed because of the hyphen in the name of the databse? Perhaps in this sql also backticks should have been used (as I see in MySQL dumps of newer versions):

DROP TABLE IF EXISTS `customers_groups`;
CREATE TABLE `customers_groups` (
customers_group_id smallint UNSIGNED NOT NULL,
customers_group_name varchar(32) NOT NULL default '',
customers_group_show_tax enum('1','0') NOT NULL,
customers_group_tax_exempt enum('0','1') NOT NULL,
group_payment_allowed varchar(255) NOT NULL default '',
group_shipment_allowed varchar(255) NOT NULL default '',
PRIMARY KEY (customers_group_id)
);

INSERT INTO `customers_groups` VALUES('0','Retail','1','0','','');

Share this post


Link to post
Share on other sites
DROP TABLE IF EXISTS `customers_groups`;
CREATE TABLE `customers_groups`

INSERT INTO `customers_groups` VALUES('0','Retail','1','0','','');

 

 

Jan,

 

I changed the table name to `customers_groups` but I got a SQL syntax error (#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'customers_groups``' at line 1)

 

I suspect I might be doing something wrong with the bits on the same line:

VALUES('0','Retail','1','0','','');

 

I have inserted the values as (0,Retail,1,0, , ); in other words no use of ''.

I'm going to wrap all the values in '' now just like you have it in the script and see what happen.

 

 

Rich

Share this post


Link to post
Share on other sites

Has anyone used this MOD along with SPPC??

 

Bundled Products contribution, http://www.oscommerce.com/community/contributions,2015/

 

It allows you to take individual items and group them together to make a bundled kit at a savings over buying each item individually..

 

 

Thanks


Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Share this post


Link to post
Share on other sites

Richard,

I changed the table name to `customers_groups` but I got a SQL syntax error (#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'customers_groups``' at line 1)

 

I suspect I might be doing something wrong with the bits on the same line:

VALUES('0','Retail','1','0','','');

I tried this (locally) on MySQL 4.0.13 and it has absolutely no problem with the backticks and this sql. Whether the table is there or not, no errors and the execution of the sql works fine. You do seem to have two backticks on the table customers_groups: 'customers_groups``' though :huh:

Share this post


Link to post
Share on other sites
Richard,

I tried this (locally) on MySQL 4.0.13 and it has absolutely no problem with the backticks and this sql. Whether the table is there or not, no errors and the execution of the sql works fine. You do seem to have two backticks on the table customers_groups: 'customers_groups``' though :huh:

 

 

Jan,

 

I think that ` is automatically wrapped round table names on my server thus adding another ` to the name doubles up. e.g the standard query for the table customers runs like SELECT * FROM `customers` WHERE 1. Here the table name customer is wrapped with ` even though the table name is just customer (as listed on the db) without the ` . I hope that's what you meant.

Share this post


Link to post
Share on other sites
I think that ` is automatically wrapped round table names on my server thus adding another ` to the name doubles up.
Never seen that, adding more backticks would certainly give a problem then. Did you try that query without backticks yet? Was that table customer_groups in the database?

Share this post


Link to post
Share on other sites
Never seen that, adding more backticks would certainly give a problem then. Did you try that query without backticks yet? Was that table customer_groups in the database?

 

Yes, I did without the ` and the query returns nothing. And yes, table customer_groups is in the database, it just wouldn't tolerate ` round it. Funny enough it accepts ' round it though, then you have something like this SELECT * FROM `'customers_groups'` WHERE 1 - in the standard customers_groups query. But the bottom line is the query still doesn't run.

 

What's your comment to the way the value are inserted as I stated in a couple of my post back. Is that likely to affect the table's values wrongly?

Share this post


Link to post
Share on other sites
Yes, I did without the ` and the query returns nothing. And yes, table customer_groups is in the database, it just wouldn't tolerate ` round it. Funny enough it accepts ' round it though, then you have something like this SELECT * FROM `'customers_groups'` WHERE 1 - in the standard customers_groups query. But the bottom line is the query still doesn't run.
Strange, strange, strange.
What's your comment to the way the value are inserted as I stated in a couple of my post back. Is that likely to affect the table's values wrongly?
I expect an error message. Can't you fill that table with phpMyAdmin? You only need to fill in 0, Retail, and 1, the rest will be automaticly left blank.

Share this post


Link to post
Share on other sites

im working at doing the osCommerce 2.2 Milestone 2 051113 Update and have a question:

 

http://www.oscommerce.com/ext/update-20051113.html

 

towards the end in the "MySQL 5.0 Compatibility" section...both the changes to catalog/advanced_search_result.php and catalog/index.php mix with changes made during the SPPC install. Advise on doing these steps of the 051113 Update on these pages, or dont bother?

 

Thanks

Share this post


Link to post
Share on other sites
towards the end in the "MySQL 5.0 Compatibility" section...both the changes to catalog/advanced_search_result.php and catalog/index.php mix with changes made during the SPPC install. Advise on doing these steps of the 051113 Update on these pages, or dont bother?
Good question. Haven't had the time to study that yet. It looks like they might not apply to the SPPC queries (because special prices are handled differently) but perhaps they fail in MySQL 5 too. Haven't used that new version...

Share this post


Link to post
Share on other sites

Looking to install Credit Class & Gift Voucher with my SPPC.

 

This is one of the last things I would like to get done before the release of my new site, www.ipodcarparts.com/index.php

 

Has anyone used it with SPPC, I searched this thread but found nothing. Any suggestions? Unfourtunately the documation on this contribution is not that good, it seems that the install is more of a replace the entire file job than an edit/merge job.

 

With the Christmas season coming up soon.. i'm very busy (as we all are), but if anyone is looking for some extra money ($$$) and would like to do it, please PM me and we can work somthing out.

 

Thanks

 

Nathan Levy

Share this post


Link to post
Share on other sites
Looking to install Credit Class & Gift Voucher with my SPPC.

 

Has anyone used it with SPPC, I searched this thread but found nothing. Any suggestions? Unfourtunately the documation on this contribution is not that good, it seems that the install is more of a replace the entire file job than an edit/merge job.

Hey!

 

I had Credit Class & Gift Voucher already installed, before installing SPPC. I can't tell you what, if anything I had to do for compatibility as I have quite a few other contributions, and I don't really know which had to be modified (I had some modifying to do when installing SPPC - I received generously here, what help I needed and then some). I can tell you that it all works together fine at this point.

 

I know this wasn't any help really, it was more meant to be info.

 

Regards,

 

Carlos

Share this post


Link to post
Share on other sites

Hello.

 

I have installed this mod with Hide products, happy hour and best sellers for SPPC with no problem. I am now trying to install the price break mod for SPPC and I can't get around a parse error

 

Parse error: parse error, unexpected '&' in /home/xxx/admin/categories.php on line 909

 

 

in the admin > catergories.php install step. I did it manually 1 by 1 (uploading after each change in the file) twice and the error seems to be here

 

 

 

$customers_group['customers_group_id'] . ']', true) . ' ' . $customers_group['customers_group_name'];
  } 
 </td>
   <td class="main"><?php
   $customer_prices_set = false;
   $customer_prices_in_post = false;

 

 

 

I tried removing it, but it just makes the " < " the next error. Anyone know how to get rid of this error?

Edited by simplyclesha

Thanks!

Clesha

Share this post


Link to post
Share on other sites

i have osCommerce 2.2 Milestone installed and i want to use diff price for 3 type of customers. .Do i have ti install Separate Price Per Customer Version 4.0 !!! where can i download that from

Share this post


Link to post
Share on other sites

Hi JanZ,

 

Got a quick question for you, when adding Specials you can set each groups individual special price, is their a way to add All Groups to the drop down menu so I can set a special price for every single group (ie either 10% off or a set price) which would add the special to each group automatically instead of me setting 6-7 instances of the special price especially when they will most likely be the same price?

Share this post


Link to post
Share on other sites
Does anyone mind sharing a site where this contribution is installed. I would like to see what it looks like.

 

Thank you.

 

Ernie

 

This site does not change the look so much, but more so of how the cart works.

 

Two sites:

 

www.blackwidowsecurity.com/store (live)

 

www.ipodcarparts.com/index.php (coming soon)

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

×