Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

newtech

Pioneers
  • Posts

    494
  • Joined

  • Last visited

Everything posted by newtech

  1. Forgot to add file. <?php /* $Id: product_specials.php,v 1.01 2006/11/13 00:00:00 holforty Exp $ Designed for: osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2005 Todd Holforty - [email protected] Released under the GNU General Public License */ ?> <!-- product_specials //--> <?php // are we viewing a specific product? ($product_info['products_id'] is set if we are) if (tep_not_null($product_info['products_id'])) { $the_products_catagory_query = tep_db_query("select products_id, categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . $product_info['products_id'] . "'" . " order by products_id,categories_id"); $the_products_catagory = tep_db_fetch_array($the_products_catagory_query); $product_category_id = $the_products_catagory['categories_id']; } if ( LIMIT_PRODUCT_SPECIALS_SCOPE=='true' && !empty($current_category_id) ) { /// We are in category depth $categories_query_addition = "p2c.categories_id = '" . (int)$current_category_id . "'"; $categories = array(); tep_get_sub_categories($categories, $current_category_id); foreach ($categories AS $key => $category ) { $categories_query_addition .= " or p2c.categories_id = '" . (int)$category . "'"; } } if ( (LIMIT_PRODUCT_SPECIALS_SCOPE=='true') && !empty($categories_query_addition) ) { /// We are in category depth $product_specials_query = tep_db_query("select distinct p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_SPECIALS . " s where p.products_status='1' and p.products_id=s.products_id and p.products_id=pd.products_id and pd.language_id='".(int)$languages_id."' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and s.status='1' and (".$categories_query_addition.") order by rand() limit ".MAX_DISPLAY_PRODUCT_SPECIALS); } else if ( (LIMIT_PRODUCT_SPECIALS_SCOPE=='true') && !empty($product_category_id) ) { // products info page $product_specials_query = tep_db_query("select distinct p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_SPECIALS . " s where p.products_status='1' and p.products_id=s.products_id and p.products_id=pd.products_id and pd.language_id='".(int)$languages_id."' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and s.status='1' and c.categories_id = '" . (int)$product_category_id . "' order by rand() limit ".MAX_DISPLAY_PRODUCT_SPECIALS); } else { // default $product_specials_query = tep_db_query("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status='1' and p.products_id=s.products_id and p.products_id=pd.products_id and pd.language_id='".(int)$languages_id."' and s.status='1' order by rand() limit ".MAX_DISPLAY_PRODUCT_SPECIALS); } if (tep_db_num_rows($product_specials_query)>0) { $info_box_contents = array(); $info_box_contents[] = array('text' => '<a href="'.tep_href_link(FILENAME_SPECIALS).'">'.TABLE_HEADING_PRODUCT_SPECIALS.'</a>' ); new infoBoxHeading($info_box_contents,false,false, tep_href_link(FILENAME_SPECIALS)); $row = 0; $col = 0; $info_box_contents = array(); while ($product_specials = tep_db_fetch_array($product_specials_query)) { $products_price = (tep_not_null($product_specials['specials_new_products_price'])?'<s>'.$currencies->display_price($product_specials['products_price'], tep_get_tax_rate($product_specials['products_tax_class_id'])).'</s> ':'').'<span class="productSpecialPrice">' . $currencies->display_price($product_specials['specials_new_products_price'], tep_get_tax_rate($product_specials['products_tax_class_id'])).'</span>'; $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_specials['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $product_specials['products_image'], $product_specials['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_specials['products_id']) . '">' . $product_specials['products_name'] . '</a><br>' . $products_price ); $col ++; if ($col > PRODUCT_SPECIALS_DISPLAY_COLUMNS-1) { $col = 0; $row ++; } } new contentBox($info_box_contents); } ?> <!-- product_specials_eof //-->
  2. This is probably simple as can be and I am making it hard as can be. The only file that is installed with this contrib is the following. There are no edits to the box.php file. So what would I replace to make this file use specialsBoxHeading class?
  3. I found a post saying to do the following: if (tep_not_null($order->info['cc_number'])) { $this->cc_card_number_less_middle_digits = substr($order->info['cc_number'], 0, 4) . str_repeat('x', (strlen($order->info['cc_number']) - 8)) . substr($order->info['cc_number'], -4); ?> <td> <b><?php echo ENTRY_PAYMENT_METHOD; ?></b> <?php echo $order->info['payment_method']; ?> (<?php echo $order->info['cc_type']; ?>)<br><?php echo tep_draw_separator('pixel_trans.gif', '100%', '6'); ?><br> <b><?php echo ENTRY_PAYMENT_CC_NUMBER; ?></b> <?php echo $this->cc_card_number_less_middle_digits; ?></td> <?php } else but that did not help any.
  4. This is what I want to use but I am having problems with it. I get this error message: Here is the apache error code I am getting: Using $this when not in object context in /html/admin/invoice.php on line 180 Here is line 179 and 180. <?php if (tep_not_null($order->info['cc_number'])) { $this->cc_card_number_less_middle_digits = substr($order->info['cc_number'], 0, 4) . str_repeat('x', (strlen($order->info['cc_number']) - 8)) . substr($order->info['cc_number'], -4); ?> Any suggestions to fix this?
  5. If the new box is not included in the includes/boxes (like this specials box), then there is no way to edit the box file in includes/boxes. This specials box is using the infoBoxHeading class. I don't want all of my other boxes that use infoBoxHeading class to be changed, so I would like the specials box to have it's own class. How can I assign it a different class?
  6. I have this somewhat fixed. The problem was that on line 30 of includes/modules/email_invoice/email_invoice.php the command was wrong It was: require(DIR_FS_ADMIN . DIR_WS_LANGUAGES . $language . "/" . FILENAME_ORDERS_INVOICE); this was generating the following path /adminincludes/languages/english/invoice.php Changed line 30 to: require(DIR_FS_ADMIN . "/" . DIR_WS_LANGUAGES . $language . "/" . FILENAME_ORDERS_INVOICE); this generates the correct path /admin/includes/languages/english/invoice.php So now I have html generated invoices. BUT HAVE ANOTHER PROBLEM The html generated e-mail invoices ( have the wrong invoice number. They are adding 06- to teh fornt of the invoice number, i.e. Invoice # 06-12 when it should be Invoice # 12 The non html invoices do not have the 06- in the invoice number. From what I can see, the code for the invoice number is the same for both templates. Any idea what is causing the 06 to be added to the invoices? BTW tghe box template is all messed up.
  7. I should mention that I am not using PayPal to process credit cards. Here is the apache error code I am getting: Using $this when not in object context in /var/www/public_html/ahaplace/html/admin/invoice.php on line 180 Here is line 170 and 180. <?php if (tep_not_null($order->info['cc_number'])) { $this->cc_card_number_less_middle_digits = substr($order->info['cc_number'], 0, 4) . str_repeat('x', (strlen($order->info['cc_number']) - 8)) . substr($order->info['cc_number'], -4); ?> Anybody get credit cards (not using PayPal) to work with this contrib?
  8. Another problem. When credit card orders are placed, the packing slip shows the order properly, but when viewing the invoice in admin or via customer account, the invoice is cut off. It does not show the product ordered, totals, or the footer of the invocie.
  9. Found another bug in the program. When I go into Admin E-Mail Options and turn on 'Use MIME html when sending e-mails", when a customer places an order and clicks confirmation, they get a blank screen and no e-mail is sent out. However, the orders are shown to have taken place. Anybody know how to fix the MIME issue?
  10. There is another problem with the Shipping Table Rate Module. It does not calculate the different rates, just goes by the first entry of each table. There is a bug report on this: http://www.oscommerce.com/community/bugs,9...pping%2BModules But the bug report does not have a fix. It suggests making changes with paypal, but that does no good for those for us who are not using paypal. Has anyone come up with a fix?
  11. I know I saw a post regarding how to remove the extra pricing that is being shown (price including tax). But know I can't find it no matter what terms I use. Anyone know how to do this?
  12. This was one of the original posts on this topic. 2 minutes-who are you kidding. This contrib has all kinds of bugs, missing code, etc. Took 5 hours and still not completely done with it. The good news is that it will be a nice contrib when done. The developer needs to come out with a clean version.
  13. This is crazy. It is a known bug. Yet it took posting about this issue under the contrib section, shipping section, pm contrib developer and here with no response from anyone. It took searching for a couple of hours and then finding a bug report. http://www.oscommerce.com/community/bugs,2742/search,2742 So I guess when you run into a problem, besides looking in this forum also look in the bug report section.
  14. I have a store I cannot open until I can have this shipping option set up. I am at a lose as to what to do. Anybody have any ideas? Help!!!!
  15. For some reason I never saw that file no matter how many times I looked for it. But I found it, made necessary edits. So now, all of the invoices and packing slips are displaying good overall except for the invoice on the customers side. Did anyone ever figure out how to resolve the problem with only the first letter of the county being shown? I also need to remove the extra pricing that is being shown (price including tax). I knwo I saw a post on that issue. So, FYI this contrib does work with Design Pack.
  16. The account_history_info.php page has to be pulling the codes from different defines than what are in print_my_invoice.php. For example: <?php echo HEADING_PAYMENT_METHOD; ?> This is defined correctly on my site. But there is no define found for this in print_my_invoice.php. So the define must be someplace else. Example: The following item is on the account_history_info.php page <?php echo HEADING_PRODUCTS; ?> and it does not display properly. I created a define for it in print_my_invoice.php. But is still does not display properly. So, again, where are the defines located for anythign referenced in account_history_info.php?
  17. Why can't I make this contrib use a different class to generate a box by editing the code. So, instead of it using infoBoxHeading it uses SpecialsBox (a class I have defined in my boxes.php and sytlesheet.css). Where/how would I edit the code in the Specials Module script? Again, I don't want to modify my infoBoxHeading class definitions because it is applicable to several other boxes. It makes more sense to edit what class Specials Module is using.
  18. I have installed the Specials Module Contribution http://www.oscommerce.com/community/contributions,4010 It is working fine, but I want to change the colors of the box. I want it to be the same as the specials box in the right column. Because it is not part of the OSC default package, Design Pack does not have a css style for this box. The Specials Module Contrib is using the infoBoxHeading class to define the colors. The problem with this is that I do not want it to be this class. I want it to be the specialsBoxHeading. I have tried to explain to the Specials Module Contributor what I would like to do, but they are of no help. http://www.oscommerce.com/forums/index.php?s=&...st&p=982513 through http://www.oscommerce.com/forums/index.php?s=&...st&p=983415 I would think there are two ways to accomplish what I want: 1. Manually insert the class for the Specials Box manually (at ther right location which I cannot figure out) in the index.php 2. Create a specific class in the stylesheet for the Specials Box in main area and then in the Specials Module file insert that stylesheet. Can anyone help on this? There must be others that want their Specials Box to be different than other infoboxes.
  19. I am that user. But I don't see how the design pack would create the problem. There is nothing that I know of that it is doing that would affect invoices, packing slips, etc. When I look at the codes in the account_history_info.php file, there are codes that do not compare with any of the defines of the language files. Some of the codes in the account_history_info.php are different than in the invoice.php, and print_my_invoice.php files. For example: account_history_info.php uses the following codes HEADING_PRODUCTS HEADING_MODEL HEADING_UNIT HEADING_TOTAL Which I cannot find a define any place. Don't know where this file gets the defines. (If I did I would insert the necessary defines in the appopriate file.) When you click 'Print Order' print_my_invoice.php uses the following codes: TABLE_HEADING_PRODUCTS TABLE_HEADING_UNIT_PRICE TABLE_HEADING_TOTAL I thought the solution would be to change the codes in account_history_info.php but that does not work. There must be a simple solution to this problem. What is the name and location of the file that gives the defines for the codes that are found in account_history_info.php
  20. I still cannot get easypopulate to work. I have fgound out what the problem is. The problem is how the path to the temp folder is identified. I know the contgrib will work because I tested it on another store: I just tried easypopulate with a different store, on a different server, with a different path for the store. www.domain.com/oscommerce/catalog is the store location. In my admin/config.php I have: define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); I have the dir path as: $tempdir = DIR_FS_DOCUMENT_ROOT . "/oscommerce/catalog/temp/"; I was able to get easypopulate to work properly (in therory-have not checked all the files). HERE IS my configuration for the store that needs to go live. My other store is located at the root: www.mydomain.com In my admin/config.php I have: define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); When I have the dir path as: $tempdir = "/temp/"; The script reads the above as /tmp/:/tmp:/usr/:/var/www/public_html/domain When I have the dir path as: $tempdir = . "/temp/"; The script does not work When I have the dir path as: $tempdir = DIR_FS_DOCUMENT_ROOT . "/temp/"; The script reads the above as (DIR_FS_DOCUMENT_ROOT/temp/test6.txt) I was told to try the following for admin/config.php define('DIR_FS_$DOCUMENT_ROOT', '/var/www/public_html/domain/html/'); This also gives error messages. HELP-Is there anyone using easypopulate and OSC configured to be in the root of the domain instead of in a subfolder?
  21. I must not be explaining myself clearly. I am using design pack contrib. It takes the variety of info boxes and defines styles, text color, etc. via css. There is also a default css for info boxes. Here is my problem. I do not want the specials box in the main section to be the defaulted style. And because it is a contrib, design pack does not have a style for it. So, I want to create my own style and then assign that class to the box. Per comments on a previous post, I obviously am defining the box incorrectly. Can you please tell me where/how I would insert the styleclass for the specials box?
  22. I also have the above problem, plus one other related to this. The order that the customer sees (account_history_info) also has code in it and the admin invoice also . How do you fix this? Plus all three have the following code. define('INVOICE_TEXT_INVOICE_DATE', 'Invoice Nr.'); It does shopw the date, but how can I get this coode to disappear? There are two other problems I am having. 1. account_history_info This is the page the customer sees when they view an order. The table with the order info has the code headings instead of the actual headings. No matter how hard I look (probably looking too hard) I cannot find where to define the headings. I think they must be missing or something. HEADING_PRODUCTS HEADING_MODEL HEADING_UNIT HEADING_TOTAL When I go to print the order this headings are defined properly. So I know these headings are not defined in the print_my_invoice.php file that is under language folders. 2. Customer invoice that they print At the bottom of the invoice there are codes that needs defined: TEXT_INFO_ORDERS_STATUS_NAME I don't see these codes in the print_my_invoice.php file under languages. Any ideas on fixes?
  23. I just tried easypopulate with a different store, on a different server, with a different path for the store. In my error log there are two commands that are causing errors just like my other store. Error on line 844 // now we string the entire thing together in case there were carriage returns in the data $newreaded = ""; foreach ($readed as $read){ $newreaded .= $read; }
  24. I have the same problem as the earlier poster. I have edited the includes/languages/english/print_my_invoice.php file but my invoice is missing these defines when I view it. What am I doing wrong? Plus I am missing all the other defines even though they are in print_my_invoice.php file. (see below) ALSO, as a customer, when I go to click on the IMAGE_BUTTON_PRINT_ORDER (which is also not defined), I get 'page not found error'. The link is: <a href="java script:popupPrintReceipt('https://www.aplaceofhopestore.com/FILENAME_PRINT_MY_INVOICE?order_id=1 I see nothing in the install where I am to define this URL. Where do I do this? define('INVOICE_TEXT_THANK_YOU', 'Thank you for shopping at A Place of Hope Store'); // Printed at the bottom of your invoices define('STORE_URL_ADDRESS', 'http://www.aplaceofhopestore.com'); // Your web address Printed at the bottom of your invoices // Image Info define('INVOICE_IMAGE', 'images/aplaceofhopestore.jpg'); //Change this to match your logo image and foler it is in define('INVOICE_IMAGE_WIDTH', '241'); // Change this to your logo's width define('INVOICE_IMAGE_HEIGHT', '28'); // Change this to your logo's height define('INVOICE_IMAGE_ALT_TEXT', A Place of Hope Store); // Change this to your logo's ALT text or leave blank // Misc Invoice Info define('INVOICE_TEXT_NUMBER_SIGN', '#'); define('INVOICE_TEXT_DASH', '-'); define('INVOICE_TEXT_COLON', ':'); define('INVOICE_TEXT_INVOICE', 'Invoice'); define('INVOICE_TEXT_ORDER', 'Order'); define('INVOICE_TEXT_DATE_OF_ORDER', 'Date of Order'); define('ENTRY_PAYMENT_CC_NUMBER', 'Credit Card:'); // Customer Info define('ENTRY_SOLD_TO', 'SOLD TO:'); define('ENTRY_SHIP_TO', 'SHIP TO:'); define('ENTRY_PAYMENT_METHOD', 'Payment:'); P.S. As a note I am using Desgin Pack Contrib
×
×
  • Create New...