Jump to content
Latest News: (loading..)
jpweber

Quantity Price Breaks

Recommended Posts

I have recently tried to install Qunatity Price Break per Product but fallen at the last hurdle.

 

I have updated the database and all the files apart from admin\categories.php when i try and copy in the revised coding and save the file the file empties itself, (file size = 0 bytes) i have tried going through the file adding each part in turn but still it fails to save properly. Having given up for the evening i tried to copy in the original code from a backup copy and this time is saved properly!

 

Has anybody seen this problem before?

That's the first time I have ever heard of that. You do edit the file locally with a real text editor like jEdit and then upload the file with ftp. Better idea is to have the shop on your own computer first where you can have MySQL, Apache, and PHP running and then when everything works at it should locally do the sql changes to the shop and ftp the changed files to the website.
We currently have products in the shop, some of which have attributes set, is this possibly the problem?
No. Have you added any other contributions to that page? If not use the already changed page from the package or if you have, use that page to add the other contribution(s) to it.

Share this post


Link to post
Share on other sites

Thanks JanZ

 

All sorted.

 

I do not have MySQL or Apache on my computer and decided to use the management system within OsCommerce.

 

I changed the permissions on the shop folder structure to allow ftp access and uploaded the file and it overwrote the original file perfectly and now i the discount options up and running. :D

 

Thank you for you assistance. :thumbsup:

Share this post


Link to post
Share on other sites

Hey guys - I just installed the latest version of Quantity Price Breaks Per Product, and everything looks good, except when i specify an amount, that's supposed to result in a price break, it only add's one of the item to the cart. I even went back and spent another half hour double checking that everything was installed and copied correctly, but it's still not working. Does anyone have any ideas? Thank you so much

Share this post


Link to post
Share on other sites
.. everything looks good, except when i specify an amount, that's supposed to result in a price break, it only add's one of the item to the cart. I even went back and spent another half hour double checking that everything was installed and copied correctly, but it's still not working.
There are only two pieces of code that are responsible for that: the input field in product_info.php and the "case add_product" in includes/application_top.php. The input field in product_info.ph should have the name 'cart_quantity'.

Or perhaps you add your amount from a product listing on index.php?

Share this post


Link to post
Share on other sites

hello,

 

I've added your privebreak 1.2.1 and it works very well but time to time I get following 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 ' 5183) and pd.language_id = '2'' at line 1 

select pd.products_name, p.products_model, p.products_image, p.products_id, p.manufacturers_id, p.products_price, p.products_weight, p.products_quantity, p.products_price1, p.products_price2, p.products_price3,p.products_price4, p.products_price5, p.products_price6, p.products_price7, p.products_price8, p.products_price1_qty, p.products_price2_qty, p.products_price3_qty, p.products_price4_qty, p.products_price5_qty, p.products_price6_qty, p.products_price7_qty, p.products_price8_qty, p.products_qty_blocks, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price from products p left join specials s on p.products_id = s.products_id, products_description pd where p.products_status = '1' and pd.products_id = p.products_id and p.products_id in (, 5183) and pd.language_id = '2'

 

it seems that the variable $product_id_list is broken, because

 

...p.products_id in (, 5183)...

 

doesn't work.

 

someone knows how to fix this?

 

thank you.

 

best regards

Share this post


Link to post
Share on other sites
it seems that the variable $product_id_list is broken, because

 

...p.products_id in (, 5183)...

 

doesn't work.

That is weird. IMO tt would mean that the first product in the cart is an empty value or tep_get_prid returns false.

Looks like PriceFormatterStore.php is doing that.

Try changing line 27-29:

				foreach ($product_id_list_temp_array as $key => $value) {
				$product_id_list_array[] = tep_get_prid($value);
			}

to:

				foreach ($product_id_list_temp_array as $key => $value) {
// only add valid values
			  $valid_value = tep_get_prid($value);
			  if (tep_not_null($valid_value)) {
				$product_id_list_array[] = $valid_value;
			   }
			}

Share this post


Link to post
Share on other sites

Hi Jan,

 

I found your contribution very useful, but I cannot make it work. I am a newbee and I do not know much about programming, so please bear with me.

I installed the QPBBP and the admin side looks good: I have the price break boxes in the new product page and the the price brakes work well.

Unfortunately, when I click on the checkout button I am taken to the login page and after inserting the login and passsword info I get the following message:

 

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 ' 52, 48, 50, 53, 28) and pd.language_id = '1'' at line 1

 

select pd.products_name, p.products_model, p.products_image, p.products_id, p.manufacturers_id, p.products_price, p.products_weight, p.products_quantity, p.products_price1, p.products_price2, p.products_price3,p.products_price4, p.products_price5, p.products_price6, p.products_price7, p.products_price8, p.products_price1_qty, p.products_price2_qty, p.products_price3_qty, p.products_price4_qty, p.products_price5_qty, p.products_price6_qty, p.products_price7_qty, p.products_price8_qty, p.products_qty_blocks, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price from products p left join specials s on p.products_id = s.products_id, products_description pd where p.products_status = '1' and pd.products_id = p.products_id and p.products_id in (, 52, 48, 50, 53, 28) and pd.language_id = '1'

 

[TEP STOP]

 

 

In this case I had four products in the shopping cart (52, 48, 50, 53, 28).

I am running MySQL 4.0.27 on an Apache server.

 

I hope you can figure this out.

 

Thanks

Share this post


Link to post
Share on other sites

I solved the problem.

I modified as follows:

 

In admin/includes/classes find split_page_results.php and - BACK IT UP then find the lines

 

$offset = ($max_rows_per_page * ($current_page_number - 1));

$sql_query .= " limit " . $offset . ", " . $max_rows_per_page;

 

change to

 

$offset = ($max_rows_per_page * ($current_page_number - 1));

if ($offset < 0)

{

$offset = 0 ;

}

$sql_query .= " limit " . $offset . ", " . $max_rows_per_page;

 

as suggested in this post: http://forums.oscommerce.com/index.php?showtopic=144095

Share this post


Link to post
Share on other sites

Hello,

 

I installed osCommerce 2.2 Milestone 2 Update 060817 and Qunatity Price Breaks Per Product v1.2.2

(I just copied the files from the catalog directory to the catalog directory on the server an overwrote the files there).

I also altered the table in the right way. But when I try to visit the shop now, all I get is an Internal Server Error.

Whats wrong?

 

I have an Apache/1.3.26 with MySQL 5 running.

 

Sorry for my poor english,

thanks for your help!

Share this post


Link to post
Share on other sites
all I get is an Internal Server Error.

Whats wrong?

Not a clue. Have you asked your hosting provider if they can see what page/code is causing that error? Did you upload them as ASCII text, not binary? Just guessing here.

Share this post


Link to post
Share on other sites
Seems to be there are plenty of reasons other than code errors that can crash with and Internal Server Error :(

Hello Jan,

Thanks for this contribution. The fact is I need a contribution that allows to sell bottles of wine just in packs of 6/12/18... and I need to make it work for all my products (around 600). Do you know how to make it, the special contrib from canadian1 didn't work ?

Thanks for your answer.

Best regards.

Share this post


Link to post
Share on other sites
The fact is I need a contribution that allows to sell bottles of wine just in packs of 6/12/18... and I need to make it work for all my products (around 600). Do you know how to make it, the special contrib from canadian1 didn't work ?
I have no clue what you mean by that last sentence, but only allowing a product to be bought in quantities of 6 is a standard feature that I have always seen working fine.

Share this post


Link to post
Share on other sites
I have no clue what you mean by that last sentence, but only allowing a product to be bought in quantities of 6 is a standard feature that I have always seen working fine.

Sorry Jan, my normal language is french and I'm not so good in english.

The contrib works fine for each product but if I want to sell only packs of 6 bottles for all products in my database I have to modify each product separetely. Did I miss something, or is there a place where we can define at least 6 items for every product in the catalog ? With ~600 products ion the catalog it's a lot of work to change every product. There was a post on the 21 Jul 2006 from canad1an who posted a script for populating all the database automatically but I couldn't make it work on my server. Thanks for your answer.

Share this post


Link to post
Share on other sites
The contrib works fine for each product but if I want to sell only packs of 6 bottles for all products in my database I have to modify each product separetely. Did I miss something, or is there a place where we can define at least 6 items for every product in the catalog ? With ~600 products ion the catalog it's a lot of work to change every product. There was a post on the 21 Jul 2006 from canad1an who posted a script for populating all the database automatically but I couldn't make it work on my server.
OK, now I understand what you want to achieve. I couldn't find back the post canad1an in this thread so couldn't see what he/she did. This worked fine for me:

update products set products_qty_blocks = '6';

Share this post


Link to post
Share on other sites
OK, now I understand what you want to achieve. I couldn't find back the post canad1an in this thread so couldn't see what he/she did. This worked fine for me:

update products set products_qty_blocks = '6';

Jan,

Thanks a lot for your information. It works fine now !!!

Many thanks.

Share this post


Link to post
Share on other sites

I have QPBPP installed and it seems to work fine except when i set attributes. For example I have allspice 1oz. baggie 3.29 and glass jars 5.29 when set this way with attributes it won't give the price break. if i remove the attribute it works fine but then I have to set the price for only baggies or glass jars not both.

Share this post


Link to post
Share on other sites
I have QPBPP installed and it seems to work fine except when i set attributes. For example I have allspice 1oz. baggie 3.29 and glass jars 5.29 when set this way with attributes it won't give the price break. if i remove the attribute it works fine but then I have to set the price for only baggies or glass jars not both.
Apparently, you have not installed the latest version(s). There are instructions to cope with that scenario in there now.

Share this post


Link to post
Share on other sites

I have installed quantity price breaks, no problems there.

 

The problem that occurs is that the product attribute drop down boxes do not appear now.

 

How can I get both to work at the same time?

 

Thank you

Share this post


Link to post
Share on other sites
The problem that occurs is that the product attribute drop down boxes do not appear now.

 

How can I get both to work at the same time?

One has nothing to do with the other. You must have made a mistake when adding the contribution I suppose.

Share this post


Link to post
Share on other sites
One has nothing to do with the other. You must have made a mistake when adding the contribution I suppose.

 

 

Thanks so much, this is good news. I am going to start with a fresh install and try it one more time.

Share this post


Link to post
Share on other sites

Got it all to work. Got my drop-downs and my price breaks.

 

I do have another question though...

 

There are contributions that will allow a minimum quantity per product, is there one that will work best with the Quantity Price Breaks contribution..

 

I know that I can specify the minimum quantity in the contribution but that will only allow a customer to order in the specified quantity amounts..

any ideas would be appreciated.

 

Thank you again

Share this post


Link to post
Share on other sites
I have installed V1.2.3 of Quantity Price Breaks Per Product.

 

As illustrated here http://dev.melworks.com.au/catalog/acrylic...ads-p-1002.html

 

my formatting is not right.

 

The quantity box and the price table in the top right corner does not look good. Is it something I have to fix in stylesheet or I have messed up somewhere else.

 

Thanks

 

 

That is how mine looks, the small box, as shown in your example

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

×