Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Seperate Pricing Per Customer v3.5


scendent

Recommended Posts

Ok - I removed the $pf->adjustQty(1) from the master_listing.php and I also removed the Quantity 1 text box from product_info.php. It is correctly adjusting the product price for quantity purchases! YAY!! :thumbsup:

 

Now for the update process - LOL

 

Well, I have found something strange. Even though the text box that the customer enters the quantity they would like starts out empty - if you don't enter anything into the box it automatically adds one to the cart.

 

For example - I have two different sizes of the same product, so the table shows one row for the 2oz size and one row for the 4oz size. If I only enter a quantity for the 4 oz size and click "Add to Cart" - it adds 1 of the 2oz size and then however many I entered into the quantity box for the 4oz size.

 

How do I stop this from happening?

~Tracy
 

Link to comment
Share on other sites

Well, I have found something strange. Even though the text box that the customer enters the quantity they would like starts out empty - if you don't enter anything into the box it automatically adds one to the cart.

 

For example - I have two different sizes of the same product, so the table shows one row for the 2oz size and one row for the 4oz size. If I only enter a quantity for the 4 oz size and click "Add to Cart" - it adds 1 of the 2oz size and then however many I entered into the quantity box for the 4oz size.

 

How do I stop this from happening?

 

Hmmm - even if I enter 0 in the quantity it stills puts one in the cart :huh:

~Tracy
 

Link to comment
Share on other sites

Hello again everyone, I'm having an issue with products not being added to the cart, heres the scenario:

 

The "Details" and "Add to Cart" buttons in the page that displays the products in a category (ie: http://www.aestheticdepot.com/shop/index.php?cPath=9_19), the links are missing the products_id=xx, but if I click on the product image it will take me to the product display page and the buttons there work fine. The other only page where everything works is the New Products page. I'm not getting any kind of code errors but obviously I messed something up.

 

Anyone have an idea on how to fix this? I've searched this thread but its pretty big and haven't found a solution...

Link to comment
Share on other sites

Just found this other error under Specials in the Admin Panel

 

Warning: Division by zero in /home/oliver/public_html/shop/admin/specials.php on line 330

 

And this is what that line looks like

$contents[] = array('text' => '' . TEXT_INFO_PERCENTAGE . ' ' . number_format(100 - (($sInfo->specials_new_products_price / $sInfo->products_price) * 100)) . '%');

Link to comment
Share on other sites

Is there an Easy Populate file out there that can guide me in adjusting mine so it deals with?...

SPPC

Quantity Price Breaks for SPPC

 

At present, mine will not handle the price breaks for the additional customer groups but does do the retail group fine.

 

I am using version: "easypopulate.php,v 2.76d 2006/10/16 22:50:52 surfalot" to get around the mangled HTML problems I had with 2.8.

 

I assume it would be the addition of the below series of items (and its other variations) after every customer group entry in the EP file? I think!

 

'v_products_price1',

'v_products_price2',

'v_products_price3',

'v_products_price4',

'v_products_price1_qty',

'v_products_price2_qty',

'v_products_price3_qty',

'v_products_price4_qty',

'v_products_qty_blocks',

 

 

I need a guide to help with this if possible.

 

Thanks,

Rod

I like these mods, there fun! ...65 70 72 75 80 85 125+ contributions installed and counting...

 

Tools I'm using: OSC2.2 milestone2, Filezilla for FTP, PHP Designer 2007PE (nice), Araxis Merge 6.5 to compare files, XP(my box), Remote Server is shared Apache 1.3 Cpanel, CURL, and PHPmyAdmin through my hosts Cpanel to mess up the database.

Link to comment
Share on other sites

It will be a MVS shop very soon.

 

Thanks,

Rod

Edited by Leak-Proof

I like these mods, there fun! ...65 70 72 75 80 85 125+ contributions installed and counting...

 

Tools I'm using: OSC2.2 milestone2, Filezilla for FTP, PHP Designer 2007PE (nice), Araxis Merge 6.5 to compare files, XP(my box), Remote Server is shared Apache 1.3 Cpanel, CURL, and PHPmyAdmin through my hosts Cpanel to mess up the database.

Link to comment
Share on other sites

Hello again everyone, I'm having an issue with products not being added to the cart, heres the scenario:

 

The "Details" and "Add to Cart" buttons in the page that displays the products in a category (ie: http://www.aestheticdepot.com/shop/index.php?cPath=9_19), the links are missing the products_id=xx, but if I click on the product image it will take me to the product display page and the buttons there work fine. The other only page where everything works is the New Products page. I'm not getting any kind of code errors but obviously I messed something up.

 

Anyone have an idea on how to fix this? I've searched this thread but its pretty big and haven't found a solution...

 

You missed an [$x] somewhere in your Add to Cart case. Your links should look like this:

. $listing[$x]['products_id'],

 

Somewhere in your product_listing.php or your product_info.php you have this:

. $listing['products_id'],

~Tracy
 

Link to comment
Share on other sites

Sure, you could do something:

insert into products_groups select '1' AS customers_group_id, (0.8 * p.products_price) AS customers_group_price, p.products_id FROM products p;

if the price should be 20% off for customer group 1.

 

You could also use Quick Price Updates for SPPC for faster updates of prices.

 

Where would one add this code to be able to use a percentage instead of inputting the exact price in the admin/categories.php page for each customer group?

I also have Quantity Price Breaks for SPPC and MVS.

I like these mods, there fun! ...65 70 72 75 80 85 125+ contributions installed and counting...

 

Tools I'm using: OSC2.2 milestone2, Filezilla for FTP, PHP Designer 2007PE (nice), Araxis Merge 6.5 to compare files, XP(my box), Remote Server is shared Apache 1.3 Cpanel, CURL, and PHPmyAdmin through my hosts Cpanel to mess up the database.

Link to comment
Share on other sites

Just found this other error under Specials in the Admin Panel

 

Warning: Division by zero in /home/oliver/public_html/shop/admin/specials.php on line 330

 

And this is what that line looks like

$contents[] = array('text' => '' . TEXT_INFO_PERCENTAGE . ' ' . number_format(100 - (($sInfo->specials_new_products_price / $sInfo->products_price) * 100)) . '%');

It is not an error, it is a warning...

 

And if it bothers you, use the following code, it will show 0% in that case and no warning.

		$contents[] = array('text' => '' . TEXT_INFO_PERCENTAGE . ' ' . number_format(100 - (($sInfo->specials_new_products_price / ($sInfo->products_price == 0 ? $sInfo->specials_new_products_price : $sInfo->products_price)) * 100)) . '%');

Link to comment
Share on other sites

Where would one add this code to be able to use a percentage instead of inputting the exact price in the admin/categories.php page for each customer group?
phpMyAdmin
I also have Quantity Price Breaks for SPPC and MVS.
QPBPB for SPPC: not that easy. MVS: not really familiar with that, isn't there a shop_id involved too? Add that to the sql then.
Link to comment
Share on other sites

Hmmm - even if I enter 0 in the quantity it stills puts one in the cart :huh:

That is strange indeed. You do indeed need the zero or '' in the master_listing.php but in application_top.php the add_cart is not called if the quantity is zero:

	  //Master Products						 
  // customer adds multiple products from the master_listing page

  case 'add_slave' :	
						reset( $HTTP_POST_VARS );
						  while ( list( $key, $val ) = each( $HTTP_POST_VARS ) ) { 

							 if (substr($key,0,11) == "Qty_ProdId_") { 

							 $prodId = substr($key,11); 

							 $qty = $val; 
// if zero: go to the next HTTP_POST_VARS on next line
							 if ($qty <= 0 ) continue; 


							 $cart->add_cart($prodId, $cart->get_quantity(tep_get_uprid($prodId, $HTTP_POST_VARS['id']))+($qty), $HTTP_POST_VARS['id']);

Link to comment
Share on other sites

This did the trick!! thanks :thumbsup:

 

You missed an [$x] somewhere in your Add to Cart case. Your links should look like this:

. $listing[$x]['products_id'],

 

Somewhere in your product_listing.php or your product_info.php you have this:

. $listing['products_id'],

Link to comment
Share on other sites

Great, that took care of the warning but I still have problems with the Specials page (I guess I forgot to mention that before). It shows the box where the product/info should go but nothing is displayed. Its similar to the problem TracyS just helped me with... take a look http://www.aestheticdepot.com/shop/specials.php

 

It is not an error, it is a warning...

 

And if it bothers you, use the following code, it will show 0% in that case and no warning.

		$contents[] = array('text' => '' . TEXT_INFO_PERCENTAGE . ' ' . number_format(100 - (($sInfo->specials_new_products_price / ($sInfo->products_price == 0 ? $sInfo->specials_new_products_price : $sInfo->products_price)) * 100)) . '%');

Link to comment
Share on other sites

That is strange indeed. You do indeed need the zero or '' in the master_listing.php but in application_top.php the add_cart is not called if the quantity is zero:

// if zero: go to the next HTTP_POST_VARS on next line
if ($qty <= 0 ) continue;

 

Thanks Janz!! Adding that line above did the trick! I don't even need to have "0" show in the quantity box on the master_listing.php page - if it's empty it treats it as a 0 apparently :thumbsup:

 

Now - one part left. How do I go about showing the customer that there is a price break? Right now it looks the same as it always has, but when you add multiples of the same item to your cart it calculates them at the price listed in the price breaks. It just doesn't tell them anywhere that they are getting a price break - LOL I saw something somewhere in the updates about changing a file if you change how the break displays - but I can't seem to find where the instructions are for showing the price breaks in the first place - let alone changing how they look - LOL

 

Also, I'm not sure if I'm setting it up correctly or not. If the product is $30.50 when you buy one or two, but changes to $28.98 when you buy 3, 4 or 5, and then to $27.45 when you buy 6 or more.... do I need to have 3, 4, 5, 6, 7, 8 etc... all setup - or if I just create the break at 3 and then another break at 6 will it know that 4 and 5 are $28.98 and anything above 6 is at $27.45 ?

 

Thanks again!

~Tracy
 

Link to comment
Share on other sites

Now - one part left. How do I go about showing the customer that there is a price break? Right now it looks the same as it always has, but when you add multiples of the same item to your cart it calculates them at the price listed in the price breaks. It just doesn't tell them anywhere that they are getting a price break - LOL I saw something somewhere in the updates about changing a file if you change how the break displays - but I can't seem to find where the instructions are for showing the price breaks in the first place - let alone changing how they look - LOL
In listings it is done only with showing a range: $4 - $5 (function getPriceStringShort in PriceFormatter.php). The one I said it is not a big deal if you leave it out for the moment.

 

Also, I'm not sure if I'm setting it up correctly or not. If the product is $30.50 when you buy one or two, but changes to $28.98 when you buy 3, 4 or 5, and then to $27.45 when you buy 6 or more.... do I need to have 3, 4, 5, 6, 7, 8 etc... all setup - or if I just create the break at 3 and then another break at 6 will it know that 4 and 5 are $28.98 and anything above 6 is at $27.45 ?
The latter: 3, 6 I think.
Link to comment
Share on other sites

In listings it is done only with showing a range: $4 - $5 (function getPriceStringShort in PriceFormatter.php). The one I said it is not a big deal if you leave it out for the moment.

 

The latter: 3, 6 I think.

 

Thanks Jan. I found an older post and used it to create a table that informs the customer of the 5% and 10% discount - at the beginning of the table is code that is supposed to say if there are no price breaks then display "There are no price breaks for this product" type message, else - display this table.

 

Unfortunately - if I use the code that they had on my master_listing.php page, I always get the "no price breaks" message.

if ($product_info['products_price1'] == '0.0000'){

 

If I change the code to the below, I always get the table listing the 5 and 10% price breaks

if ($listing[$x]['products_price1'] == '0.0000'){

 

Any thoughts on how to correctly find only those products which have a price break? What I'm thinking is doing it is the fact that the product_id in the URL is the Master Product. The product_id's which have price breaks are the Slave products. So maybe I have to change or add a query that looks for the product_ids where the master is == to the products_id in the URL ?

 

Thanks again!

~Tracy
 

Link to comment
Share on other sites

phpMyAdmin

QPBPB for SPPC: not that easy. MVS: not really familiar with that, isn't there a shop_id involved too? Add that to the sql then.

 

Thanks Jan

I like these mods, there fun! ...65 70 72 75 80 85 125+ contributions installed and counting...

 

Tools I'm using: OSC2.2 milestone2, Filezilla for FTP, PHP Designer 2007PE (nice), Araxis Merge 6.5 to compare files, XP(my box), Remote Server is shared Apache 1.3 Cpanel, CURL, and PHPmyAdmin through my hosts Cpanel to mess up the database.

Link to comment
Share on other sites

Is there an Easy Populate work-up for Quantity Price Breaks for SPPC?

I need a guide so I can adapt my 2.76d version to enter all those numbers.

 

Rod J

I like these mods, there fun! ...65 70 72 75 80 85 125+ contributions installed and counting...

 

Tools I'm using: OSC2.2 milestone2, Filezilla for FTP, PHP Designer 2007PE (nice), Araxis Merge 6.5 to compare files, XP(my box), Remote Server is shared Apache 1.3 Cpanel, CURL, and PHPmyAdmin through my hosts Cpanel to mess up the database.

Link to comment
Share on other sites

I found an older post and used it to create a table that informs the customer of the 5% and 10% discount - at the beginning of the table is code that is supposed to say if there are no price breaks then display "There are no price breaks for this product" type message, else - display this table.

 

Unfortunately - if I use the code that they had on my master_listing.php page, I always get the "no price breaks" message.

if ($product_info['products_price1'] == '0.0000'){

 

If I change the code to the below, I always get the table listing the 5 and 10% price breaks

if ($listing[$x]['products_price1'] == '0.0000'){

 

Any thoughts on how to correctly find only those products which have a price break? What I'm thinking is doing it is the fact that the product_id in the URL is the Master Product. The product_id's which have price breaks are the Slave products. So maybe I have to change or add a query that looks for the product_ids where the master is == to the products_id in the URL ?

Did you look at the product_listing.php of QPBPB for SPPC? That is quite a bit of code that need to be added to master_listing.php to have that information available. I wonder if you added all that code...

 

Perhaps you can save yourself some work by making use of PriceFormatterStore.php. The class function PriceFormatterStore.php takes the list of product_id's in the cart to do basically the same work as need to be added to master_listing.php. If you copy that function, paste it again, rename it and change it to accept a variable (which would be an array with all the product_id's that are in the listing: something like function MasterListingStore($productid_array) and then first check if that pricebreak already has been stored (look at function getPriceBreak($product_id) how that is done) before you do the $this->addPriceBreakData($product_info[$x]['products_id'], $product_info[$x]); you can call PriceFormatter with $pf->loadProduct($product_id) and subsequently call the functions of PriceFormatter.

 

You could add your own as described above by you.

Link to comment
Share on other sites

Is there an Easy Populate work-up for Quantity Price Breaks for SPPC?

Surely more than one person will have that. Unfortunately I have no clue about Easy Populate so hopefully somebody more knowledgeable about will read this and be able to point you in the right direction.

Link to comment
Share on other sites

Looked through the forums and can't find anyone else with this problem so it must be my install of SPPC v 4.14 the tax exempt = yes is not working the wholesaler gets wholesale price but if in Ontario (Tax classes setup as per Tax class contrib) both taxes are still applied even though customer group is set to exempt. Everything else works wonderfully. I have three groups Retail, Wholesale and Wholesale tax exempt (Only Applies to Ontario tax exempt wholesaler). Any ideas of where I should look for the problem?

 

Thanks

Carrie

Edited by webworks123
Link to comment
Share on other sites

Looked through the forums and can't find anyone else with this problem so it must be my install of SPPC v 4.14 the tax exempt = yes is not working the wholesaler gets wholesale price but if in Ontario (Tax classes setup as per Tax class contrib) both taxes are still applied even though customer group is set to exempt. Everything else works wonderfully. I have three groups Retail, Wholesale and Wholesale tax exempt (Only Applies to Ontario tax exempt wholesaler). Any ideas of where I should look for the problem?

Start with checking the exempt tax is added to the session parameters correctly (login.php should take care of that). For example adding to a footer:

echo '<pre>';
print_r($_SESSION);

The code for making specific taxes exempt for a customer or customer group is already finished for ages, but not uploaded yet to the contribution area.

Link to comment
Share on other sites

Start with checking the exempt tax is added to the session parameters correctly (login.php should take care of that). For example adding to a footer:

echo '<pre>';
print_r($_SESSION);

The code for making specific taxes exempt for a customer or customer group is already finished for ages, but not uploaded yet to the contribution area.

 

Ok thanks this is the output->

[billto] => 13

[payment] => paypal_ipn

[cart_PayPal_IPN_ID] => -32

[customer_id] => 13535

[customer_default_address_id] => 13

[customer_first_name] => Carrie

[sppc_customer_group_id] => 2

[sppc_customer_group_show_tax] => 0

[sppc_customer_group_tax_exempt] => 1

[customer_country_id] => 38

[customer_zone_id] => 74

[cartID] =>

 

And I checked the database and customers_group_tax_exempt is set to 1

 

So where next?

 

Thanks

Carrie

Link to comment
Share on other sites

Start with checking the exempt tax is added to the session parameters correctly (login.php should take care of that). For example adding to a footer:

echo '<pre>';
print_r($_SESSION);

The code for making specific taxes exempt for a customer or customer group is already finished for ages, but not uploaded yet to the contribution area.

 

Ok thanks this is the output->

[billto] => 13

[payment] => paypal_ipn

[cart_PayPal_IPN_ID] => -32

[customer_id] => 13535

[customer_default_address_id] => 13

[customer_first_name] => Carrie

[sppc_customer_group_id] => 2

[sppc_customer_group_show_tax] => 0

[sppc_customer_group_tax_exempt] => 1

[customer_country_id] => 38

[customer_zone_id] => 74

[cartID] =>

 

And I checked the database and customers_group_tax_exempt is set to 1

 

So where next?

 

Thanks

Carrie

Link to comment
Share on other sites

Sorry for the double posting it got hung ....

 

I guess I missed part of the additional code in the functions file and have fixed that and it works except now they are totally tax exempt and I would still need to charge GST as tax exempt is PST only. Is that contrib available for different taxes willing to be a guinea pig ;~)

 

Carrie

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