Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

bbailey

Archived
  • Posts

    19
  • Joined

  • Last visited

Everything posted by bbailey

  1. I was really hopping that I would not have to bug you again, but then this error just popped up out of the blue, very weird because I did not change any code: Warning: Missing argument 3 for PriceFormatter::loadProduct(), called in /var/www/html/catalog/product_info.php on line 121 and defined in /var/www/html/catalog/includes/classes/PriceFormatter.php on line 35 Warning: Missing argument 4 for PriceFormatter::loadProduct(), called in /var/www/html/catalog/product_info.php on line 121 and defined in /var/www/html/catalog/includes/classes/PriceFormatter.php on line 35 Line 121 on product_info.php starts with: $pf->loadProduct((int)$_GET['products_id'], (int)$languages_id); $products_price=$pf->getPriceString(); Line 35 on PriceFormatter.php starts with: function loadProduct($product_id, $products_price, $products_tax_class_id, $qtyBlocks, $price_breaks_array = NULL) { global $pfs; Any clue what went wrong? Thanks for your help - Brittany
  2. I know it is probably a lot to ask for, but by any chance is there a manual upgrade from version 1.3.1 to the new 1.3.2b so that people who already have it installed can simply make the updates page by page, to try and avoid mistakes, to fix the problem that you created a new one for? It is of course possible without it, it just seems like it might be easier with.
  3. I am not sure if I am still having the problem in my previous post, but I re-did the pages again, and am now having this error: Call to undefined method shoppingCart::get_product_id_list() in /var/www/html/catalog/includes/classes/PriceFormatterStore.php on line 22 Line 22 being: $product_id_list = $cart->product_id_list(); I searched this problem and Jan found that you once told someone to go back to RC2a for the currencies.php file, but that was when they were having this problem on the shopping_cart.php, I am not sure if I should go to the same with it being on PriceFormatterStore.php, but if it is, do you have a link to that one? I am really trying to search as much as I can for these problems, because I am sure you have better things to deal with. Any suggestions? Thank you.
  4. Here are some of the line numbers, I kind of forgot about that aspect, sorry. I have it exactly like your file in the download so I am not sure what is not available. Where would I find the functions tos ee if it is needed? 400 // BOF qpbpp 401$pf->loadProduct($products_id, $languages_id); 402 if ($product = $pfs->getPriceFormatterData($products_id)) { 403 $prid = $product['products_id']; 404 $products_tax = tep_get_tax_rate($product['products_tax_class_id']); 405 $products_price = $pf->computePrice($qty, $nof_items_in_cart_same_cat); 406 // EOF qpbpp
  5. Jan, Thanks so much for making these updates, and so quickly!! I went through as best I could to update what I already had, with other contributions as well, to make the edits to the pages that you mentioned and I am now getting this error, and am not sure where to go, I tried to match everything up perfectly, but I know I probably missed something. Have any ideas of where the fix could be? Fatal error: Call to a member function getPriceFormatterData() on a non-object in /var/www/html/catalog/includes/classes/shopping_cart.php on line 402 This is a few lines of my code, can you see any errors: // BOF qpbpp $discount_category_quantity = array(); // calculates no of items per discount category in shopping basket foreach ($this->contents as $products_id => $contents_array) { if (!isset($discount_category_quantity[$contents_array['discount_categories_id']])) { $discount_category_quantity[$contents_array['discount_categories_id']] = $contents_array['qty']; } else { $discount_category_quantity[$contents_array['discount_categories_id']] += $contents_array['qty']; } } // end foreach $pf = new PriceFormatter; // EOF qpbpp // BOF qpbpp $discount_category_quantity = array(); // calculates no of items per discount category in shopping basket foreach ($this->contents as $products_id => $contents_array) { if (!isset($discount_category_quantity[$contents_array['discount_categories_id']])) { $discount_category_quantity[$contents_array['discount_categories_id']] = $contents_array['qty']; } else { $discount_category_quantity[$contents_array['discount_categories_id']] += $contents_array['qty']; } } // end foreach $pf = new PriceFormatter; // EOF qpbpp // BOF qpbpp if (tep_not_null($this->contents[$products_id]['discount_categories_id'])) { $nof_items_in_cart_same_cat = $discount_category_quantity[$this->contents[$products_id]['discount_categories_id']]; $nof_other_items_in_cart_same_cat = $nof_items_in_cart_same_cat - $qty; } else { $nof_other_items_in_cart_same_cat = 0; } // EOF qpbpp // products price /* // BOF qpbpp $nof_items_in_cart_same_cat = $discount_category_quantity[$this->contents[$products_id]['discount_categories_id']]; $nof_other_items_in_cart_same_cat = $nof_items_in_cart_same_cat - $qty; */ //$product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); $product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight, products_qty_blocks from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); if ($product = tep_db_fetch_array($product_query)) { // BOF qpbpp $pf->loadProduct($products_id, $languages_id); if ($product = $pfs->getPriceFormatterData($products_id)) { $prid = $product['products_id']; $products_tax = tep_get_tax_rate($product['products_tax_class_id']); $products_price = $pf->computePrice($qty, $nof_items_in_cart_same_cat); // EOF qpbpp //$products_price = $product['products_price']; // EOF qpbpp $products_weight = $product['products_weight']; // BOF qpbpp /* $specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$prid . "' and status = '1'"); if (tep_db_num_rows ($specials_query)) { $specials = tep_db_fetch_array($specials_query); $products_price = $specials['specials_new_products_price']; } */ // EOF qpbpp $this->total += tep_add_tax($products_price, $products_tax) * $qty; $this->weight += ($qty * $products_weight); } // attributes price if (isset($this->contents[$products_id]['attributes'])) { reset($this->contents[$products_id]['attributes']); while (list($option, $value) = each($this->contents[$products_id]['attributes'])) { $attribute_price_query = tep_db_query("select options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$prid . "' and options_id = '" . (int)$option . "' and options_values_id = '" . (int)$value . "'"); $attribute_price = tep_db_fetch_array($attribute_price_query); if ($attribute_price['price_prefix'] == '+') { $this->total += $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax); } else { $this->total -= $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax); } } } } } function attributes_price($products_id) { $attributes_price = 0; if (isset($this->contents[$products_id]['attributes'])) { reset($this->contents[$products_id]['attributes']); while (list($option, $value) = each($this->contents[$products_id]['attributes'])) { $attribute_price_query = tep_db_query("select options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "' and options_id = '" . (int)$option . "' and options_values_id = '" . (int)$value . "'"); $attribute_price = tep_db_fetch_array($attribute_price_query); if ($attribute_price['price_prefix'] == '+') { $attributes_price += $attribute_price['options_values_price']; } else { $attributes_price -= $attribute_price['options_values_price']; } } } return $attributes_price; } function get_products() { global $languages_id, $pfs; if (!is_array($this->contents)) return false; // BOF qpbpp $discount_category_quantity = array(); foreach ($this->contents as $products_id => $contents_array) { if(tep_not_null($contents_array['discount_categories_id'])) { if (!isset($discount_category_quantity[$contents_array['discount_categories_id']])) { $discount_category_quantity[$contents_array['discount_categories_id']] = $contents_array['qty']; } else { $discount_category_quantity[$contents_array['discount_categories_id']] += $contents_array['qty']; } } } // end foreach $pf = new PriceFormatter; // EOF qpbpp $products_array = array(); reset($this->contents); while (list($products_id, ) = each($this->contents)) { // BOF qpbpp $pf->loadProduct($products_id, $languages_id); // does query if necessary and adds to // PriceFormatterStore or gets info from it next if ($products = $pfs->getPriceFormatterData($products_id)) { if (tep_not_null($this->contents[$products_id]['discount_categories_id'])) { $nof_items_in_cart_same_cat = $discount_category_quantity[$this->contents[$products_id]['discount_categories_id']]; $nof_other_items_in_cart_same_cat = $nof_items_in_cart_same_cat - $this->contents[$products_id]['qty']; } else { $nof_other_items_in_cart_same_cat = 0; } $products_price = $pf->computePrice($this->contents[$products_id]['qty'], $nof_other_items_in_cart_same_cat); // EOF qpbpp $products_array[] = array('id' => $products_id, 'name' => $products['products_name'], 'model' => $products['products_model'], 'image' => $products['products_image'], // BOF qpbpp 'discount_categories_id' => $this->contents[$products_id]['discount_categories_id'], // EOF qpbpp /*// BOF qpbpp //$products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_tax_class_id, p.products_qty_blocks from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); if ($products = tep_db_fetch_array($products_query)) { /* $prid = $products['products_id']; $products_price = $products['products_price']; $specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$prid . "' and status = '1'"); if (tep_db_num_rows($specials_query)) { $specials = tep_db_fetch_array($specials_query); $products_price = $specials['specials_new_products_price']; } $pf->loadProduct($products['products_id'], $products['products_price'], $products['products_tax_class_id'], (int)$products['products_qty_blocks']); $nof_items_in_cart_same_cat = $discount_category_quantity[$this->contents[$products_id]['discount_categories_id']]; $nof_other_items_in_cart_same_cat = $nof_items_in_cart_same_cat - $this->contents[$products_id]['qty']; $products_price = $pf->computePrice($this->contents[$products_id]['qty'], $nof_other_items_in_cart_same_cat); // EOF qpbpp */ 'price' => $products_price, 'quantity' => $this->contents[$products_id]['qty'], 'weight' => $products['products_weight'], 'final_price' => ($products_price + $this->attributes_price($products_id)), 'tax_class_id' => $products['products_tax_class_id'], // BOF Product Type Option //'attributes' => (isset($this->contents[$products_id]['attributes']) ? $this->contents[$products_id]['attributes'] : '')); 'attributes' => (isset($this->contents[$products_id]['attributes']) ? $this->contents[$products_id]['attributes'] : ''), 'attributes_values' => (isset($this->contents[$products_id]['attributes_values']) ? $this->contents[$products_id]['attributes_values'] : '')); // EOF Product Type Option Please let me know. Thank you for all of your help.
  6. I have found a few people that have this problem that I am, but don't understand the answer for it to be fixed. First, amazing contribution, but I have this problem still with no clue on how to fix it. The price breaks are combing in the shopping cart, which we would not like to happen. Say the price break for 50 is 27 and for 100 is 39 when buying one product and if you wanted to buy two sepearte products you would add the total of each product, not combine the amounts. For example, the customer is going to order productA that is 27 when buying 50, and they also want some of productB which is 27 for 50 as well but both products are or are not in the same category. single purchases work fine, but when two are combined, when it gets to the shopping cart instead of the total being 27+27=54, it is the price break for a product when ordering 100 - 39 (which is not a good sign for the store!). I am searched and searched for an answer to this, can anyone point me in the right direction. Is this even possible? We deffinately want customers to be able to order more than one without a problem. Thanks in advance for any help.
  7. Thanks Glen, After getting this, I talked to the client about the information and API they sent me, and they had another file they didn't send me which was apparently the correct API certificate so now that it is in place, I wasn't sure if their was a standard in certificates because I thought the file I had looked weird, everything is working great now. Thank you for the response so I knew where to go from there, I really appreciate it. Thanks - Brittany
  8. I got the Quantity Price Breaks to work pretty well and it is an amazing contribution! There are two things I would like to do though that I can not seem to figure out. Instead of a input_field for the quantity field, I would like it to be a pull down box that only gives 4 options, because we sell packages in only 4 options. Does anyone know how to do this? Any help would be appreciated, I have googled and searched in this forum for any help but have not seen anyone with this problem, but I have seen oscommerce example stores using it. The other problem is that, 4 only have 4 available packaging options, 50, 100, 200 and 300, and when someone purchases one set of one of those, for example 50 notecards of no.1, everything works fine, the math adds correctly, and the product gets added to the cart at the right price and everything is fine (27.00), but if the customer goes back and adds another set of 50 notecards no.2 when they go to the cart, now the total price is the amount for a discount of 100 (39.00) not a total amount for 2 sets of 50 (27 + 27). This will present a huge problem if customers want to order more than one. Does anyone know how to make the total price not add the amounts together and give them a discount as well? Any help is really appreciated, I am pretty new to this so the contributions have been helping tremendously.
  9. Does anyone know what I should do with an Error58? I have made sure the API is there and the link to it is correct. Is there a standard API format that is used, what Paypal gave is is exactly what we saved in the file. Does anyone have any suggestions or anything that I can use to try and get past this connection issue? Thank you for any help.
  10. Hi, I am not an expert at this at all, but I think i had a similar problem to this and talked to my server, and this is how they fixed it. You may not get to your files through the file manager, but however you get to you files, this is how I fixed mine, and turned global variables on. So i don't think you create a new file, i think you edit an existing one, it seems pretty simple, here is the log: Me: I am getting this error "Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory." Server: What you would need to do is, from your Site Manager, login to File Manager, then click the "Up one directory" button until the "Current Directory:" reads "/". Server: Then click on the "etc" directory. Then click on the pencil to the right of the "php.ini" file. Server: At this point you will want to look for the "register_globals" directive, and you will just change the value to either Off or On. I hope this helps.
  11. Hello, I am trying to see if any one knows where i cang et started on fixing this error when running the diagnostics: Able to connect to PayPal through cURL? No Error received: 58: unable to use client certificate (no key found or wrong pass phrase?) I contacted my server to see if there is a proxy address, they said leaving it blank is correct, so it should be able to connect to the cURL, and I had to install the new php5.2.5 rather than the 4.4.7 or something along those lines for the cURL to be installed, and was hoping that would fix it, but it didn't. I have searched through the forum and the web to see what fixes are for error 58, but have only seen questions, not answers. Does anyone have an idea of where I can get started for fixing this. I am curious if maybe there is a problem with the fact that I have the catalog directory password protected at the moment so that users can not accidentally find the store while it is under construction, but I'm not sure if that would make any difference. If you have any pointers, please let me know. Thanks!
  12. I have successfully installed QPBPP (as far as I know!) and so far so good (it's just what we needed), but wanted to see if it was possible to add just a few more customizations and am wondering if anyone knows how to do this. I would like the quantity box to be a drop down of only 4 amounts, 50, 100, 200, and 300. I am working in catalog/product_info.php and see how I can turn the code from input_field to tep_draw_pull_down_menu, but after that I am not sure how to code it to read the 4 amounts I would like. It seems like it should be a simple fix that I just can't figure out. I would also like to be able to completely get rid of the table with the %'s and +'s, the contribution provides and replace it with a simple table that reads what price the item is at the different amounts. For example, I want to sell 50 cards for $30.00, and 100 cards for $50.00, and I want to just list this rather than have the table telling the customer what the savings are and what each individual card is. I am fine with having to create that new table or inserting an image of that table, as long as I can safely hide the previously given table. is this possible? Does any of this make sense? If you could offer any help to this, I would greatly appreciate it. I have looked to see if anyone else has had this problem, but have not had any luck, please send me that direction if you know of a topic already started about this. I appreciate any help. Thanks in advance!! BBailey
  13. I have successfully installed QPBPP (as far as I know!), but wanted to see if it was possible to add just a few more customizations and am wondering if anyone know show to do this. I would like the quantity box to be a drop down of only 4 amounts, 50, 100, 200, and 300. I am working in catalog/product_info.php and see how I can turn the code from input field to tep_draw_pull_down_menu, but after that I am not sure how to code it to read the 4 amounts I would like. It seems like it should be a simple fix that I just can't figure out. I would also like to be able to completely get rid of the table with the %'s and +'s, the contribution provides and replace it with a simple table that reads what price the item is at the different amounts. For example, I want to sell 50 cards for $30.00, and 100 cards for $50.00, and I want to just list this rather than have the table telling the customer what the savings are and what each individual card is. I am fine with having to create that new table or inserting an image of that table, as long as I can safely hide the previously given table. is this possible? Does any of this make sense? If you could offer any help to this, I would greatly appreciate it. I have looked to see if anyone else has had this problem, but have not had any luck, please send me that direction if you know of a topic already started about this. I appreciate any help. Thanks in advance!! BBailey
  14. I am pretty new to osCommerce, but have absolutely been loving the contributions. I ran into a small problem and now I am stuck... I have installed the product options type feature contribution, which seems awesome. I thought I had completed it successfully, until I added the product options and the product attribute, like the directions showed, and on the page, all I have is a drop down menu, with TEXT being the only option, not a type text field. I am not sure what is causing this but am hoping that someone might be able to point me in the right direction. It is really important for the site to be able to add customized options to each product. I later hope to continue adding contributions, but would like to get this one figured out first. Does any one have any ideas or suggestions? Has anyone else had this problem? Thanks - Brittany
×
×
  • Create New...