Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

scendent

Seperate Pricing Per Customer v3.5

Recommended Posts

One could assume you do have SPPC, check in your Admin under Customers - do you have a "Customers Groups" link there? If so, I'm guessing you have SPPC installed.

 

Hi Jan

 

I've had to take over our store from somebody else and dont know much about oscommerse so please excuse my ignorance but how would I see if SPPC is installed or not. For instance on each product I can ad a different price for every customer group, Doest this mean I already have sppc?


~Tracy
 

Share this post


Link to post
Share on other sites

Thanks Tracy

 

Yes i do have that link, dont have the foggiest which version of sppc is running though.

 

Damn! Ok back to square one then. I need help to get EP to show columns for a price on each of these customer groups in the csv file and have not the foggiest where to start.

 

Should I rather take this to somebody supporting easy populate? Guess so

Share this post


Link to post
Share on other sites
Guest

open

 

catalog/admin/easypopulate.php

 

Find this:

 

// Separate Pricing Per Customer (SPPC)

define ('EP_SPPC_SUPPORT', true); // default is false

 

Change as needed. default is false, set to true

Edited by newtest

Share this post


Link to post
Share on other sites
I've had to take over our store from somebody else and dont know much about oscommerse so please excuse my ignorance but how would I see if SPPC is installed or not. For instance on each product I can ad a different price for every customer group, Doest this mean I already have sppc?

Possibly but there is also the Total B2B contribution. From comments in the code it should certainly be possible to find this out. For example the customers_groups.php file as Tracy pointed out has as a comment in the top:

$Id: catalog/admin/customers_groups.php v1.2 2008/03/07
 for Separate Pricing Per Customer

I personally never worked with Easy Populate but I understand people use it with SPPC. What version you need and what to do to make it work: beats me.

Share this post


Link to post
Share on other sites
I'm hoping you can help me debug and see why my product options aren't showing on my product info page.

You commented out that part:

$template_pinfo['productdesc'] = stripslashes($product_info['products_description']); 
/*
// Get the number of product attributes (the select list options)
$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
$products_attributes = tep_db_fetch_array($products_attributes_query);

etcetera, etcetera

} else {
 $template_pinfo['reviews'] = '';
}
*/
// See if there is a product URL

Share this post


Link to post
Share on other sites
open

 

catalog/admin/easypopulate.php

 

Find this:

 

// Separate Pricing Per Customer (SPPC)

define ('EP_SPPC_SUPPORT', true); // default is false

 

Change as needed. default is false, set to true

 

Thanks

 

Did that and now I have the columbs in my spreadsheet but they do nothing :blink:

Share this post


Link to post
Share on other sites

Yeah - I saw that after having posted this, and I tried it with that section no longer commented out and I don't get any different results. I still can't see options in my slave products list :(

 

George tried offering some code from his master_listing.php file that worked to show options by the slaves on his site, but I didn't get any different results trying it on my site - still no options by the slaves. I'm just not sure where else to look. Should the options show in the print_r($listing); array?

 

You commented out that part:

$template_pinfo['productdesc'] = stripslashes($product_info['products_description']); 
/*
// Get the number of product attributes (the select list options)
$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
$products_attributes = tep_db_fetch_array($products_attributes_query);

etcetera, etcetera

} else {
 $template_pinfo['reviews'] = '';
}
*/
// See if there is a product URL


~Tracy
 

Share this post


Link to post
Share on other sites

Hi everyone,

 

im starting to work on a new 2.2 site just as a personal project. Ive done a fresh install of 2.2 and wanted to add this contribution first as its one of the main things im after.

 

I replaced the catalogue files and ran the sppc_v41_install.sql but its come up with errors now.

DB to import to: rotortips_wikidrc (MySQL 5)

 

File to import: /www/wikidrc/sppc_v41_install.sql

 

The script has been imported successfully.

 

www page

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/rotortips/www/wikidrc/catalog/includes/functions/database.php:13)

 

anyhow does anyone have a copy of 2.2 with this contribution already added that I can do a fresh install with rather that trying to work through the errors im getting (im rather slow at this)

 

many thanks

Phil

Edited by philpop

Share this post


Link to post
Share on other sites

okay ive managed to fix the errors so the frontpage is working agian.

 

however when I go to admin i get this

 

1146 - Table 'rotortips_wikidrc.TABLE_ADMINISTRATORS' doesn't exist

 

select id from TABLE_ADMINISTRATORS limit 1

 

[TEP STOP]

 

anythoughts? thankyou

Share this post


Link to post
Share on other sites

Fixed, relised for some reason i had version 4.16 instead of the latest. Latest one works great and easy to install cheers!!!!

Share this post


Link to post
Share on other sites

I need help with this badly, can i upload all of the files to my site or do i have to do the manual installation. also how do you run the sppc_v21 installation.sql. ive gone onto mysql database online and cant seem to find how to do this.

 

better still is there anyone, that could install this for me.?

 

thankyou

Share this post


Link to post
Share on other sites
can i upload all of the files to my site or do i have to do the manual installation.

 

From one noob to another:

 

Uploading, or 'copying over' existing files means that you loose anything contained in those files that get overwritten.

 

This is only suggested for 'unmodified' / newly installed sites.

 

If you have made mods to your site you will want to run a file comparison program against those files (existing vs. new) that require change before just copying over anything...

 

Your solution could very well be a combination of both methods. Replace those that have not had mods, edit those that have. Note- Even simple cut & paste editing of files requires a certain degree of understanding and focus...

Share this post


Link to post
Share on other sites

Hi all...

 

I have decided to use a 'What's New' box and recall reading in this thread an issue in which the the cart would not update as expected from products_new.php. E.g. hit <add to cart> and the page behaves as expected except that nothing is added to the cart.

 

This code:

<td align="right" valign="middle" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_new[$x]['products_id']) . '">' . tep_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a>'; ?></td>

 

Generates this link (it's a local dev site):

http://localhost/Speed%20Demon/products_ne...561d7c84b254006

 

 

This is the only page that exhibits this behavior...

Am I brain farting here? :blink:

Any ideas or clues?

 

 

Thanks,

Greg

Share this post


Link to post
Share on other sites
I have decided to use a 'What's New' box and recall reading in this thread an issue in which the the cart would not update as expected from products_new.php. E.g. hit <add to cart> and the page behaves as expected except that nothing is added to the cart.

Link looks fine to me. However, if the products has attributes application_top.php will send you to the product_info.php page to select those. That might be the "problem".

Share this post


Link to post
Share on other sites

Hi Jan,

Yes, you hit it- well kind of. It does boil down to a brain fart on my part for certain.

 

Of course I might have mentioned my use of 'quantity' boxes initially...

 

I had modified application_top.php to support quantity boxes (the 'else' of the attributes 'if' for the other readers).

 

I also re-activated product reviews tonight- that one was quick and easy to diagnose and fix on the heels of new products.

 

...The pain us noobs bring on ourselves.

 

Now, where did I read this?

"Note- Even simple cut & paste editing of files requires a certain degree of understanding and focus..."

 

Oops

 

Thanks for the help!

Share this post


Link to post
Share on other sites

Found the problem, I had forgotten the

								  'MASTER_LIST_OPTIONS' => MASTER_LIST_OPTIONS,

at the beginning of master_products.php

 

Now I have an error coming from the Xsell contribution in xsell_cart.php due to this query:

 

$xsell_master_query = tep_db_query("SELECT products_master FROM " . TABLE_PRODUCTS . " WHERE products_id = " . $product_id_in_cart['id'] . "");
$xsell_master = tep_db_fetch_array($xsell_master_query);

 

It is causing errors trying to locate the products id.

Error is:

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 '{4}29' at line 1

 

SELECT products_master FROM products WHERE products_id = 128{4}29

 

Any thoughts on how to better write this query?

 

Yeah - I saw that after having posted this, and I tried it with that section no longer commented out and I don't get any different results. I still can't see options in my slave products list :(

 

George tried offering some code from his master_listing.php file that worked to show options by the slaves on his site, but I didn't get any different results trying it on my site - still no options by the slaves. I'm just not sure where else to look. Should the options show in the print_r($listing); array?


~Tracy
 

Share this post


Link to post
Share on other sites

fixed it !!

 

changed $product_id_in_cart['id'] to (int)$product_id_in_cart['id']

 

Woohoo!! Now to figure out how to make "Buy Now" botton grab option info instead of just the "Add to Cart" button :)

 

 

Found the problem, I had forgotten the

								  'MASTER_LIST_OPTIONS' => MASTER_LIST_OPTIONS,

at the beginning of master_products.php

 

Now I have an error coming from the Xsell contribution in xsell_cart.php due to this query:

 

$xsell_master_query = tep_db_query("SELECT products_master FROM " . TABLE_PRODUCTS . " WHERE products_id = " . $product_id_in_cart['id'] . "");
$xsell_master = tep_db_fetch_array($xsell_master_query);

 

It is causing errors trying to locate the products id.

Error is:

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 '{4}29' at line 1

 

SELECT products_master FROM products WHERE products_id = 128{4}29

 

Any thoughts on how to better write this query?


~Tracy
 

Share this post


Link to post
Share on other sites
Woohoo!! Now to figure out how to make "Buy Now" botton grab option info instead of just the "Add to Cart" button :)

 

 

Perhaps Jan's advice to peek at application_top.php can help? Namely the redirect...

 

// performed by the 'buy now' button in product listings

case 'buy_now' : if (isset($HTTP_GET_VARS['products_id'])) {

if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {

tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));

} else {

$cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+$_POST[list_quantity]);

}

}

tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

break;

Share this post


Link to post
Share on other sites

Thank you! I ended up changing out my "Buy Now" button for a Quantity Box and an "Add to Cart" button. I have a heavily modified store and my category pages show the top 10 master products along with their slaves and they are purchasable right from that page. My subcategory pages show all the products in the subcategory and their slaves and they too are purchasable right from that page. Both category and subcategory pages also can link you to the main product_info.php page for each product for further info.

 

Perhaps Jan's advice to peek at application_top.php can help? Namely the redirect...

 

// performed by the 'buy now' button in product listings

case 'buy_now' : if (isset($HTTP_GET_VARS['products_id'])) {

if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {

tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));

} else {

$cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+$_POST[list_quantity]);

}

}

tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

break;


~Tracy
 

Share this post


Link to post
Share on other sites

Hello,

First, this modification is extremely useful to me. I did the manual install, and it worked without any issues, Thanks!

 

Now, I have a customer that likes to complicate things. They have 3 price levels that break down to retail, 45% off, 50% off. The complication is with tax, as they require the tax be based on the retail amount regardless of what their price level is set to. For example purposes, if a state requires 6% tax, I'm currently setting 6% on retail, 13.3333% on 45%, and 12% tax on 50%. Ultimately, this works perfectly, but it's fugly and I don't like doing the math. I know this is someone unrelated to this mod, but would there be a simple way to do this tax calculation in the source code?

Thanks - Niles

Share this post


Link to post
Share on other sites
Now, I have a customer that likes to complicate things. They have 3 price levels that break down to retail, 45% off, 50% off. The complication is with tax, as they require the tax be based on the retail amount regardless of what their price level is set to. For example purposes, if a state requires 6% tax, I'm currently setting 6% on retail, 13.3333% on 45%, and 12% tax on 50%. Ultimately, this works perfectly, but it's fugly and I don't like doing the math. I know this is someone unrelated to this mod, but would there be a simple way to do this tax calculation in the source code?

No, there is no simple way of using the retail price for tax calculations. You would have to find all instances of where tax/prices are calculated and make sure you make the retail price a variable there and then calculate the tax with that price.

Possible, but probably a lot of work.

Share this post


Link to post
Share on other sites

Hi

 

THanks for pervious advice I actually have my easy populate and SPPC working now.

I've just spotted something else that can only come from SPPC

 

I have 4 customer groups 3 of which have discounted prices but everybody sees the retail price, the discounted price only apears once they click on the product.

 

Now i'm hoping this is a ....Set this false to true....solution ;)

 

By the way thanks to Jan and Tracy I now know that I'm running this version of sppc

v1.2 2008/03/07

Share this post


Link to post
Share on other sites
I have 4 customer groups 3 of which have discounted prices but everybody sees the retail price, the discounted price only apears once they click on the product.

Prices are changed for customer group prices in several places. product_info.php is only of them. You have to be more specific on what page that happens and then likely it is only a problem for that one page.

You have to check correct prices all the way from the listing on index.php, in boxes, on product_info.php and then adding to the cart, shopping_cart.php, box shopping_cart.php, etcetera.

Share this post


Link to post
Share on other sites

I tried SPPC with QPBPP. Works fine, but there's one issue: If there are pricebreaks for one customers group and one (or more) other groups, that have NO Quantity Pricebreaks of this article (but discount as for example 10%), the lower price of this article for the second group is not shown in cat-overview (index.php).

Until you add a product to your shopping cart the price is shown correctly and then also shown correctly in catoverview/index.php.

 

Second question: I also have Quick Group Discount for SPPC, but this modul only works WITHOUT QPBPP. The other php-file seems to have an error still. Does anybody have this problem, too?

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

×