osCommerce Community Support Forums: aberry9036 - Viewing Profile

Jump to content

Corporate Sponsor


aberry9036's Profile User Rating: -----

Reputation: 0 Neutral
Group:
Community Member
Active Posts:
20 (0.05 per day)
Most Active In:
General Add-Ons Support (7 posts)
Joined:
26-February 09
Profile Views:
1,015
Last Active:
User is offline May 01 2009 03:05 PM
Currently:
Offline

Latest Visitors

  • PhotoTiM-SE Icon
    23 Nov 2009 - 18:04
  • Photoketlait Icon
    12 Oct 2009 - 12:43
  • Photofpbv Icon
    11 Sep 2009 - 09:57
  • Photomadh52 Icon
    02 Sep 2009 - 10:49
Icon   aberry9036 has not set their status

Topics I've Started

  1. Help with slight modification

    Posted 3 Apr 2009

    Hi there, I'm using a contribution called "Bundled Products", it allows me to include several different products in to one and assign a seperate price, which is good for product sets. It works well, one problem I've got with it though is with adding products in to the bundle. This is handled in the add a new product page, in catalog/admin/categories.pho. Basically the problem I've got is that you can choose the item from a drop down box, but it doesn't seem to sort the list of products in to any order, and seeing as I'm approaching 200 products it is very difficult to find the particular product to add to the set, especially seeing as many of our products have similar names, just with different sizes etc.

    Would anyone know how to get this drop down box to sort either a > z for product descriptions? Either that or even by product ID would be useful, as I can tell if it's a new or old product. The first bit of additional code in that page is this:

    		  // BOF Bundled Products
    		  if ($HTTP_POST_VARS['products_bundle'] == "yes") {
    			tep_db_query("DELETE FROM products_bundles WHERE bundle_id = '" . $products_id . "'");
    			for ($i=0, $n=6; $i<$n; $i++) {
    			  if (isset($HTTP_POST_VARS['subproduct_' . $i . '_qty']) && $HTTP_POST_VARS['subproduct_' . $i . '_qty'] > 0) {
    				tep_db_query("INSERT INTO products_bundles (bundle_id, subproduct_id, subproduct_qty) VALUES ('" . $products_id . "', '" . $HTTP_POST_VARS['subproduct_' . $i . '_id'] . "', '" . $HTTP_POST_VARS['subproduct_' . $i . '_qty'] . "')");
    			  }
    			}
    		  }
    		  // EOF Bundled Products


    And the second part, which I believe defines the drop down box, is this:

    		  <!-- BOF Bundled Products -->
    		  <tr bgcolor="#EEEEEE">
    			<td class="main" valign="top">
    			  <?php echo TEXT_PRODUCTS_BUNDLE; ?>
    			</td>
    			<td class="main" valign="top">
    			  <table>
    				<tr>
    				  <td class="main" valign="top">
    					<?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . tep_draw_input_field('products_bundle', $pInfo->products_bundle) . '<br>("yes" or blank)'; ?>
    					  </td>
    					  <td class="main" valign="top">
    <script language="javascript"><!--
    function fillCodes() {
      for (var n=0;n<6;n++) {
    	var this_subproduct_id = eval("document.new_product.subproduct_" + n + "_id")
    	var this_subproduct_name = eval("document.new_product.subproduct_" + n + "_name")
    	var this_subproduct_qty = eval("document.new_product.subproduct_" + n + "_qty")
    	if (this_subproduct_id.value == "") {
    	  this_subproduct_id.value = document.new_product.subproduct_selector.value
    	  this_subproduct_qty.value = "1"
    	  var name = document.new_product.subproduct_selector[document.new_product.subproduct_selector.selectedIndex].text
    		this_subproduct_name.value = name
    		document.returnValue = true;
    		return true;
    	}
      }
    }
    
    function clearSubproduct(n) {
      var this_subproduct_id = eval("document.new_product.subproduct_" + n + "_id");
      var this_subproduct_name = eval("document.new_product.subproduct_" + n + "_name");
      var this_subproduct_qty = eval("document.new_product.subproduct_" + n + "_qty");
      this_subproduct_id.value = "";
      this_subproduct_name.value = "";
      this_subproduct_qty.value = "";
    }
    			//--></script>
    <?php
    	for ($i=0, $n=6; $i<$n; $i++) {
    	  echo "\n" . '<input type="text" size="30" name="subproduct_' . $i . '_name" value="' . $bundle_array[$i]['name'] . '">';
    	  echo "\n" . '<input type="text" size="3" name="subproduct_' . $i . '_id" value="' . $bundle_array[$i]['id'] . '">';
    	  echo "\n" . '<input type="text" size="2" name="subproduct_' . $i . '_qty" value="' . $bundle_array[$i]['qty'] . '">';
    	  echo "\n" . '<a href="java script:clearSubproduct(' . $i . ')">[x]</a><br>';
    	}
    	echo 'add : <select name="subproduct_selector" onchange="fillCodes()">';
    	echo '<option name="null" value="" SELECTED></option>';
    	$products = tep_db_query("select pd.products_name, p.products_id, p.products_model from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = p.products_id and pd.language_id = '" . $languages_id . "' and p.products_id <> '" . $HTTP_GET_VARS['pID'] . "' order by p.products_model");
    
    	while($products_values = tep_db_fetch_array($products)) {
    	  echo "\n" . '<option name="' . $products_values['products_model'] . '" value="' . $products_values['products_id'] . '">' . $products_values['products_model'] . ' - - - ' . $products_values['products_name'] . " (" . $products_values['products_id'] . ')</option>';
    	}
    	echo '</select>';
    ?>
    				  </td>
    				</tr>
    			  </table>
    			</td>
    		  </tr>
    		  <!-- EOF Bundled Products -->


    The drop down box is to the right of the wording "add:".

    If anyone can help me, I'd be very appreciative, as it's starting to take about 10 minutes just to add a product set :)

    If anyone needs any more information to help please let me know.

    Thanks
  2. Multi-store stock systems?

    Posted 2 Apr 2009

    Hi there, I'm running two seperate websites out of the same warehouses and shop, and I'm wondering whether anybody's made a contribution / a company has made an addon for oscommerce that allows you to link the two in to one central stock database, with different warehouses within this database?

    I know I should just google this, but I've honestly tried and I've only found about 1 on offer that costs coming up to £5k a year.

    Does anyone have any suggestions?
  3. Protx Direct credit card surcharge

    Posted 27 Mar 2009

    Hi there everyone.

    I'm using the protx direct module v5.0b for my site, and I'm wondering if it's possible to add a surcharge to credit card payments? i.e mastercard etc. In the UK this is entirely legal and a fair few budget retailers do it. I've read a couple of posts taht seem to say it's possible, but don't give a full explanation, does anyone know if this is doable?

    The module I'm using is available here
  4. Seperate thumbnail and enlarged photos

    Posted 26 Mar 2009

    Hi there, I'm having a bit of a problem with my site and I'm trying to find an add-on to fix it, but I'm not sure I can find one that does what I need..

    Basically I want to have seperate photos for the "small image" and the enlarged image because, at the moment, I'm having to use large images that scale down to the small ones. Which looks awful. The reason for this is because I want to be able to have a high quality photo for the customer to look at, but I don't need more than the two photos so a photo gallery might be a bit ott. Does anyone know of an addon that literally just uses the two seperate photos?
  5. SSL problems

    Posted 22 Mar 2009

    Hi there, I'm having a little problem with my SSL certificate setup on my site. Basically the certificate seems to work fine, but I get the "this site contains both secure and non-secure items" problem. Trouble is it isn't just on the odd page, it's that all of the images and styles are linked with "http", and when you click don't show secure items all that shows is a rough layout with no images, text or styles. Also when I click on any link it takes me back to http:, rather than https.

    This is my /includes/configure.php file contents (sensitive info has been hashed out):

    <?php
      define('HTTP_SERVER', 'http://www.halfpriceteak.co.uk');
      define('HTTPS_SERVER', 'https://www.halfpriceteak.co.uk');
      define('ENABLE_SSL', true);
      define('HTTP_COOKIE_DOMAIN', 'www.halfpriceteak.co.uk');
      define('HTTPS_COOKIE_DOMAIN', 'www.halfpriceteak.co.uk');
      define('HTTP_COOKIE_PATH', '/');
      define('HTTPS_COOKIE_PATH', '/');
      define('DIR_WS_HTTP_CATALOG', '/');
      define('DIR_WS_HTTPS_CATALOG', '/');
      define('DIR_WS_IMAGES', 'images/');
      define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
      define('DIR_WS_INCLUDES', 'includes/');
      define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
      define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
      define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
      define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
      define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
    
      define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
      define('DIR_FS_CATALOG', '#####/halfpriceteakshop/');
      define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
      define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
    
      define('DB_SERVER', '#####');
      define('DB_SERVER_USERNAME', '#####');
      define('DB_SERVER_PASSWORD', '#####');
      define('DB_DATABASE', '#####');
      define('USE_PCONNECT', 'false');
      define('STORE_SESSIONS', 'mysql');
    ?>


    This site is at https://www.halfpriceteak.co.uk/. If anyone has any ideas I'd be very grateful, thanks in advance :).

My Information

Age:
Age Unknown
Birthday:
Birthday Unknown
Real Name:
Alex Berry
Gender:
Add-On Dev:
Yes

Contact Information

E-mail:
Click here to e-mail me

Friends

aberry9036 hasn't added any friends yet.

Comments

aberry9036 has no profile comments yet. Why not say hello?