Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Quantity Price Breaks


jpweber

Recommended Posts

Hi I've just add this contribution to a site i've been making selling different sorts of tape. I've got it all running fine, but i can't get the top header displaying the actual quantity breaks to display. The price for each, and the your savings rows list perfectly and I've adjusted everything to look how I want it but I can't get any header saying what the quantity break points are ... can anyone help ? please ... cause otherwise it just looks a little bit silly.

 

Thanks in advance,

 

Regards,

 

Mark

Link to comment
Share on other sites

i managed to move it but now i have 2 prices when i dont have a quantity break.

The PriceFormatter object has a function to see if there is a pricebreak. So if $pf->hasQuantityPrice == false there is no price break. You could use that as a conditional to show the price break table (which defaults to a display of the price when there is none).

Link to comment
Share on other sites

but I can't get any header saying what the quantity break points are ... can anyone help ?

Why would it work for anyone else but not for you? Or did you make changes? And if so did you really expect us to "read" your code with a crystal ball or something similar?

Link to comment
Share on other sites

Thanks the $pf->hasQuantityPrice == false actually worked now I am trying not to include the base price in the table (but thas just a detail)

 

As for Mark who cant see the header-do you mean cant see the content of the cells or there is no row alltogether??- it MIGHT be a case of transparent background or color of letters in the infoboxheadingin stylesheet.

 

In priceformatter.php

 

<table border="0" cellspacing="1" cellpadding="4" class="infobox">';
  $lc_text .= '<tr valign="top"><td width="120" class="infoBoxHeading">' . TEXT_ENTER_QUANTITY .'</td><td align="center" class="infoBoxHeading">1+'
		 . '</td>';

  foreach($this->price_breaks as $price_break) {
	$lc_text .= '<td align="center" width="50" class="infoBoxHeading">'
	  . $price_break['products_qty']
	  .'+ </td>';

 

try changing the class from infoBoxHeading to "main" or whatever

Edited by diy
Link to comment
Share on other sites

Hello. I am a new user and i have almost finished my shop. First of all sorry for my poor English because I'm not a native speaker.

 

To make my shop running I need to add the contribution 'quantity price breaks per product'. Every of my products must have separate prices depending on quantity and I can't open my shop without it.

 

After I install the contribution (latest version and I have tried older versions also) my shop doesn't apear. All I'm getting is a blank page with no errors and no text. This happens avery time I'm adding the contributions. I tried to install it different ways like manual step-by-step, using merge software, istalling whole shop again and applying the contribution to stock installation and it just doesn't work.

 

If you know what might be the problem please let me know or are there other modules like this one that I could try? Just to remind: every of my product must have separate prices depending on quantities and these cannot be global discounts.

 

You have done great work by creating these contributions and all of the stuff. Please help just one more newbie :)

Link to comment
Share on other sites

Hello there, I quite finish my site today,

before this QPBPP_V1_3_5, I have install some other contributions, such as Easy Populate, MorePic, SEO...ect.

And I used Araxis Merge to intall this one Carefully.

But final, when coming to the product page, it show:

Fatal error: Call to a member function loadProduct() on a non-object in /home/.../public_html/product_info.php on line 113

And In my product_info.php on line 113 ,

is that the underline as below:

 

// BOF qpbpp

/*

if ($new_price = tep_get_products_special_price($product_info['products_id'])) {

$products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';

} else {

$products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));

}

*/

$pf->loadProduct((int)$_GET['products_id'], (int)$languages_id);

$products_price = $pf->getPriceString();

// EOF qpbpp

 

Could you pls advise what is problem? Is it something wrong with other constributions?

I am quite new at this, Could you pls advise me urgently how can I to fix it?

Or do you need any other information?

Pls let me know.

Many thanks...

Link to comment
Share on other sites

And when I re-imported the price_break.sql of the Contribution in PHPmyAdmin,

It showed

ALTER TABLE products ADD COLUMN products_qty_blocks int NOT NULL default 1;

 

Do I miss anything there?

Many thanks in advance if anyone can help me out!!!

Link to comment
Share on other sites

But final, when coming to the product page, it show:

Fatal error: Call to a member function loadProduct() on a non-object in /home/.../public_html/product_info.php on line 113

Sounds like this piece of code was not added to includes/application_top.php (on the catalog side):

// BOF qpbpp
 // include the price formatter classes for the price breaks contribution
 require(DIR_WS_CLASSES . 'PriceFormatter.php');
 $pf = new PriceFormatter;
 require(DIR_WS_CLASSES . 'PriceFormatterStore.php');
 $pfs = new PriceFormatterStore;
// EOF qpbpp

And you shouldn't run .sql files twice. If it ran the first time the second time will create a problem or generate an error immediately (which would be good, no harm done then).

Link to comment
Share on other sites

  • 2 weeks later...

I have installed the contribution which will fit my needs perfectly and am grateful , however I have slight problem which I can't work out.

 

I can access products perfectly if I select them from a "featured product" listing on the front page but if I try to view a product through my menu system I get the following error:

 

1064 - You have an error in your SQL Syntax. For the right syntax to use near && language_id=1 at line1.

 

SELECT 'products_description' FROM 'products_description' WHERE products_id = && language_id=1

 

I have checked and double checked the code and I have made the necessary changes. Any help in directing me in the right direction would be most gratefully received.

 

I am using OsC 2.2-RC2a and MySQL5.0. If I haven't given enough info please let me know.

 

Thanks in advance

 

John

Edited by strangename
Link to comment
Share on other sites

Hi,

 

I read this module can do the following for me:

 

1 x T-shirt = £10

2 x T-shirts = £18

3 x T-shirts = £26

 

But could I edit the system so I can insert exact prices e.g.

 

1 x T-shirt = £7.50

2 x T-shirts = £14.99

3 x T-shirts = £26.99

Link to comment
Share on other sites

Cause that was both constructive and helpful now wasn't it... 1 - I dont have a clue why it isn't working for me but does everyone else or else I'd have fixed it don't ya think. 2 - I haven't made any alterations to it whatsoever other then its location (but then thats AFTER ! I put it where its meant to be and it didn't work there either). I downloaded the latest package and did everything it said. I've not a clue why it isn't working, or else I'd have figured it out or else asked for advice on how to do whatever I thought it'd take to do it.

 

Why would it work for anyone else but not for you? Or did you make changes? And if so did you really expect us to "read" your code with a crystal ball or something similar?
Link to comment
Share on other sites

But could I edit the system so I can insert exact prices e.g.

 

1 x T-shirt = £7.50

2 x T-shirts = £14.99

3 x T-shirts = £26.99

Never tried that. You can't enter the end price you would like for the total, you enter the price per item ex VAT. So if you enter that into the database with enough precision it should work.

Link to comment
Share on other sites

Dear all,

 

first of all thanks for this contribution and to Jan who is very present for us!

 

The contribution works successfully on my website but I have a last problem with the orders.

 

When a client buys something, he has a successfull confirmation message and I receive an email but the order in the admin tool doesn't appear.

 

Do you see why? It seems that the bank file (cmcic_response.php for me) doesn't send a positive answer to my admin.

 

Any idea? Thanks in advance...

 

Gregg

Link to comment
Share on other sites

I've installed quite a few contribs so far, but this one really has me stumped! Any help at all is greatly appreciated :)

 

I'm running the most up-to-date version of OSC and this contribution.

 

You can witness the error yourself at http://www.teamzg.com/shop (click on a t-shirt)

 

From the main page, when you click on a product, it pulls up this error (on the following pages):

http://www.teamzg.com/shop/index.php?cPath=21

http://www.teamzg.com/shop/product_info.php?products_id=29

 

1054 - Unknown column 'p.products_qty_blocks' in 'field list'

select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, p.products_qty_blocks from products p, products_description pd where p.products_status = '1' and p.products_id = '29' and pd.products_id = p.products_id and pd.language_id = '1'

[TEP STOP]

 

Thanks again!

Link to comment
Share on other sites

itzbjor, did you run the SQL properly?? It just seems that you didnt create the DB tables for the contribution to work

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

itzbjor, did you run the SQL properly?? It just seems that you didnt create the DB tables for the contribution to work

Lindsay is right. It looks like you didn't run the price_break.sql because the first command in that sql file is:

alter table products 
add column products_qty_blocks int not null default 1;

Strange because I would expect a lot more errors if you have installed this and didn't run the sql file.

Link to comment
Share on other sites

  • 3 weeks later...

I've tried to install this contribution, but I've obviously gone wrong somewhere. I get the following errors:

 

In Catalog:

Parse error: syntax error, unexpected T_CASE in /home/dorytsam/public_html/dory.gr/shop2/includes/modules/product_listing.php on line 176

In Admin:

Warning: require(includes/database_tables.php) [function.require]: failed to open stream: No such file or directory in /home/dorytsam/public_html/dory.gr/shop2/admin/includes/application_top.php on line 58

 

Warning: require(includes/database_tables.php) [function.require]: failed to open stream: No such file or directory in /home/dorytsam/public_html/dory.gr/shop2/admin/includes/application_top.php on line 58

 

Fatal error: require() [function.require]: Failed opening required 'includes/database_tables.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/dorytsam/public_html/dory.gr/shop2/admin/includes/application_top.php on line 58

 

Please help!

Link to comment
Share on other sites

for your parse error it means you messed up when you pasted the new code in there.. Theres something missing. If you post the code AND GIVE LINE NUMBERS we can help that one..

 

You should then make sure that you have a file in catalog/includes/database_tables.php

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

for your parse error it means you messed up when you pasted the new code in there.. Theres something missing. If you post the code AND GIVE LINE NUMBERS we can help that one..

 

You should then make sure that you have a file in catalog/includes/database_tables.php

 

Thank you for replying!

 

Here's the product_listing code:

http://www.dory.gr/shop2/code.html

 

As for the catalog/includes/database_tables.php the database_tables.php does exist in the correct directory. Is that what you meant?

Link to comment
Share on other sites

As for the catalog/includes/database_tables.php the database_tables.php does exist in the correct directory.

But are the permissions of the file such that the webserver is allowed to read it (if not you would get the same error as if it wasn't there).

Link to comment
Share on other sites

for your parse error it means you messed up when you pasted the new code in there.. Theres something missing. If you post the code AND GIVE LINE NUMBERS we can help that one..

 

You should then make sure that you have a file in catalog/includes/database_tables.php

 

Fixed the first part. I started it from the beginning and added the correct info to the file and it works fine now.

Thank you for wanting to help!!! :)

Link to comment
Share on other sites

But are the permissions of the file such that the webserver is allowed to read it (if not you would get the same error as if it wasn't there).

I tried changing from 744 to 755 and then to 777. Nothing's changed. Argh... this is so frustrating! What am I doing wrong?

Link to comment
Share on other sites

I tried changing from 744 to 755 and then to 777. Nothing's changed. Argh... this is so frustrating! What am I doing wrong?

Perhaps you are looking at the /shop2/includes/database_tables.php instead of /shop2/admin/includes/database_tables.php?

 

I would change the name of the directory admin into something not easily guessable now that everybody can now where to find it (change your admin/includes/configure.php accordingly).

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