Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

parma

Pioneers
  • Posts

    133
  • Joined

  • Last visited

Posts posted by parma

  1. At last all is working perfectly.

    The issue with the characters in front of the response was resolved by adding ob_clean(); before echoing the response back to SagePay.

    The next issue I hit was that the response from SagePay to indicate that the payment was successful was not sending the correct response and that was because I had SESSION_BLOCK_SPIDERS set to true and HTTP_USER_AGENT from SagePay was set to an entry in DIR_WS_INCLUDES . 'spiders.txt' file, which was causing the software to not start the session properly and this redirecting the SagePay response to the login screen.

     

    The next little issue that you should be aware of is that when I added the static IP address to the SagePay settings, the subnet mask had to be set to 255.255.255.000 and not 255.255.255.255.

     

    With all of that done. All is working perfectly.

     

    You genious, I will try this out on my setup. Thanks a lot, its a shame SagePage didnt help!

  2. Hey,

    So has anyone managed to resolve the redirect issue error 5006?

    I just cant work it out.

     

    Also for some reason the total given in Sagepay Server is incorrect, the delivery charge does not have vat/tax added on to that so the figure doesnt match oscommerce, any light on this?

     

    Thanks

    parma

  3. Hi there, I get the following error.

     

    [Mon Dec 14 00:29:49 2009] [error] [client 87.194.49.148] PHP Notice:  Use of undefined constant file - assumed 'file' in /var/www/vhosts/gloveclub.co.uk/httpdocs/imagemagic.php on line 395, referer: http://www.gloveclub.co.uk/spray-wipe-sanitizer-pi-573.html

     

    Has anyone else experienced this? and if so know of a fix? Cant see any new images uploaded.

     

    Thanks

    Parma

  4. Hey,

     

    great contribution firstly! thanks works nicely.

    Only problem I have is in the admin side, I get the Catchable fatal error message for the info boxes. I have searched the topic for fixes however, no luck. Just wanted to know if anyone managed to find a fix?

     

    Thanks

    parma

  5. Hey,

     

    I have given Google Checkout another attempt, hopefully this time I

    will be more successful. Anyway I have just uploaded and configured

    version v1.4.5_CCS.

     

     

    I have put in the shipping methods which is shown below, all of my

    shipping methods are flat rate and do not change, they come up fine

    when the customer is taken to the google checkout page.

     

     

    I am using freeamount to offer free delivery for customers that order

    over a certain amount. Instead of only appearing when the value of

    freeamount is reached, it shows even when the value of the order is

    below the threshold. Is there a way of only showing the free shipping

    when the order is over a certain amount?

     

     

    Since testing it out, I have noticed all prices are taken from the

    entered amount in the Google Checkout payment module. Should it not

    take the amounts from the actual shipping modules?

     

     

    Thanks again,

     

     

    All help and suggestions are appreciated!

     

     

    GCL

     

     $this->mc_shipping_methods = $mc_shipping_methods; 
     $this->mc_shipping_methods = array( 
                           'priority' => array( 
                                       'domestic_types' => 
                                         array( 
                                             'priority' => 'Priority 
    Delivery', 
                                              ), 
    
    
                                       'international_types' => 
                                         array( 
                                           ), 
                                           ), 
                                                   'flat' => array( 
                                       'domestic_types' => 
                                         array( 
                                             'flat' => 'Standard 
    Delivery', 
                                              ), 
    
    
                                       'international_types' => 
                                         array( 
                                                                                           ), 
                                              ), 
                                                   'freeamount' => array( 
                                       'domestic_types' => 
                                         array( 
                                             'freeamount' => 'Free Shipping', 
                                              ), 
    
    
                                       'international_types' => 
                                         array( 
                                                                                           ), 
                                              ), 
                                                   'nextday' => array( 
                                       'domestic_types' => 
                                         array( 
                                             'nextday' => 'Nexy Day Noon', 
                                              ), 
    
    
                                       'international_types' => 
                                         array( 
                                                                                           ), 
                                              ), 
                                     ); 
     $this->mc_shipping_methods_names = $mc_shipping_methods_names; 
     $this->mc_shipping_methods_names = array( 
                                            'priority' => 'Priority 
    Delivery', 
                                            'flat' => 'Standard 
    Delivery', 
                                            'freeamount' => 'Free 
    Shipping', 
                                            'nextday' => 'Next Day Noon', 
                                           );

  6. Ok so ive installed the Google checkout module and everything with the installation seems fine.

    The only problem I come across is the shipping, when I go to the shopping_cart.php page it shows the following message:

    * There are multiple shipping options selected and they use different shipping tax tables or some dont use tax tablesError: Shipping Methods not configured 
    freeamount (ignored)
    nextday (ignored)

     

    I think I know why the tax table error comes up, this is because the free shipping (freeamount.php) does not let you choose a tax class. Does anyone know how I can add the tax option to the free shipping module?

     

    I managed to configure the standard flat rate shipping and it shows the correct price when I go to the google checkout page however, I also have a module called priority.php and I configured this in the shipping_methods.php file however, this only shows £1 for delivery and does not seem to be linked to the module price.

     

    Also on our site the tax is added on the goods and the delivery, is this also the case with google checkout?

     

    freeamount.php (free shipping with minimum amount module) < Need to add tax class on this so that googlecheckout does not give the tax error.

    <?php
    /*
     $Id$ freeamount.php 2
    
     The Exchange Project - Community Made Shopping!
     http://www.theexchangeproject.org
    
     Copyright (c) 2003
    
     Released under the GNU General Public License
    
     ----------------------------------------------
     ane - 06/02/02 - modified freecount.php to
     allow for freeshipping on minimum order amount
     originally written by dwatkins 1/24/02
     Modified BearHappy 09/04/04
     ----------------------------------------------
    */
    
     class freeamount {
    var $code, $title, $description, $icon, $enabled;
    
    // class constructor
    function freeamount() {
      global $order, $customer;
    
      $this->code = 'freeamount';
      $this->title = MODULE_SHIPPING_FREEAMOUNT_TEXT_TITLE;
      $this->description = MODULE_SHIPPING_FREEAMOUNT_TEXT_DESCRIPTION;
      $this->sort_order = MODULE_SHIPPING_FREEAMOUNT_SORT_ORDER;
      $this->icon ='';
      $this->enabled = ((MODULE_SHIPPING_FREEAMOUNT_STATUS == 'True') ? true : false);
    
      if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FREEAMOUNT_ZONE > 0) ) {
    
    	$check_flag = false;
    	$check_query = tep_db_query("select zone_id, zone_country_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_FREEAMOUNT_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
    	$order_shipping_country = $order->delivery['country']['id'];
    
    	while ($check = tep_db_fetch_array($check_query)) {
    
    	  if ($check['zone_id'] < 1) {
    		$check_flag = true;
    		break;
    	  } elseif ($check['zone_id'] == $order->delivery['zone_id']) {
    //		  } elseif ($check['zone_country_id'] == $order->delivery['country']['id']) {
    		$check_flag = true;
    		break;
    	  }
    	}
    	if ($check_flag == false) {
    	  $this->enabled = false;
    	}
     }
    }
    
    // class methods
    function quote($method = '') {
      global $order, $cart, $shipping_weight, $shipping_num_boxes;
    
      $dest_country = $order->delivery['country']['id'];
      $currency = $order->info['currency'];
      $get_total = false;
      $get_weight = false;
      $cart_total = $cart->show_total();
    
    	if (MODULE_SHIPPING_FREEAMOUNT_HIDE_SPECIALS == 'True') {
    	  // 28-9-2005 Check for articles on special which should not get free shipment
    	  // Adjust the cart total price for this
    	  $total_specials = 0;
    	  if ($cart->count_contents() > 0) {
    		 $products = $cart->get_products();
    		 for ($i=0, $n=sizeof($products); $i<$n; $i++) {
    			if ($special_price = tep_get_products_special_price($products[$i]['id'])) {
    			   $products_price = $special_price;
    			   $total_specials += $products_price;
    			}
    		 }
    	  }
    
    	  $cart_total = $cart_total - $total_specials;
    	}
    
      if ($cart_total < MODULE_SHIPPING_FREEAMOUNT_AMOUNT)
      {
    	if (MODULE_SHIPPING_FREEAMOUNT_DISPLAY == 'True')
    	   {
    		$this->quotes['error'] = MODULE_SHIPPING_FREEAMOUNT_TEXT_ERROR;
    	   }
    	$get_total = false;
       } else {
    	$get_total = true;
       }
      $total_weight = $shipping_num_boxes * $shipping_weight;
      if ($total_weight > MODULE_SHIPPING_FREEAMOUNT_WEIGHT_MAX)
    	  {
    		if (MODULE_SHIPPING_FREEAMOUNT_DISPLAY == 'True')
    		   {
    			  $this->quotes['error'] = MODULE_SHIPPING_FREEAMOUNT_TEXT_TO_HEIGHT;
    		   }
    		$get_weight = false;
      } else {
       $get_weight = true;
      }
    
    if (($get_total == true && $get_weight == true))
    {
    	$this->quotes = array('id' => $this->code,
    							'module' => MODULE_SHIPPING_FREEAMOUNT_TEXT_TITLE,
    							'methods' => array(array('id' => $this->code,
    							'title' => MODULE_SHIPPING_FREEAMOUNT_TEXT_WAY,
    							'cost' => MODULE_SHIPPING_FREEAMOUNT_COST)));
    }
    
    
      if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title);
    
      return $this->quotes;
    
    }
    
    function check() {
      if (!isset($this->_check)) {
    	$check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_FREEAMOUNT_STATUS'");
    	$this->_check = tep_db_num_rows($check_query);
      }
      return $this->_check;
    }
    
    function install() {
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Free Shipping with Minimum Purchase', 'MODULE_SHIPPING_FREEAMOUNT_STATUS', 'True', 'Do you want to offer minimum order free shipping?', '6', '7', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id,  sort_order, date_added) values ('Maximum Weight', 'MODULE_SHIPPING_FREEAMOUNT_WEIGHT_MAX', '10', 'What is the maximum weight you will ship?', '6', '8', now())");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Display', 'MODULE_SHIPPING_FREEAMOUNT_DISPLAY', 'True', 'Do you want to display text way if the minimum amount is not reached?', '6', '7', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id,  sort_order, date_added) values ('Minimum Cost', 'MODULE_SHIPPING_FREEAMOUNT_AMOUNT', '50.00', 'Minimum order amount purchased before shipping is free?', '6', '8', now())");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id,  sort_order, set_function, date_added) values ('Disable for Specials', 'MODULE_SHIPPING_FREEAMOUNT_HIDE_SPECIALS', 'True', 'Do you want to disable free shipping for products on special?', '6', '7', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_SHIPPING_FREEAMOUNT_SORT_ORDER', '0', 'Sort order of display.', '6', '0', now())");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Shipping Zone', 'MODULE_SHIPPING_FREEAMOUNT_ZONE', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
      }
    
    function remove() {
      tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
    }
    
      function keys() {
     $keys = array(
    	   'MODULE_SHIPPING_FREEAMOUNT_STATUS',
    	   'MODULE_SHIPPING_FREEAMOUNT_WEIGHT_MAX',
    	   'MODULE_SHIPPING_FREEAMOUNT_SORT_ORDER',
    	   'MODULE_SHIPPING_FREEAMOUNT_DISPLAY',
    	   'MODULE_SHIPPING_FREEAMOUNT_HIDE_SPECIALS',
    	   'MODULE_SHIPPING_FREEAMOUNT_AMOUNT',
    	   'MODULE_SHIPPING_FREEAMOUNT_ZONE'
    	   );
     return $keys;
      }
    }
    ?>

     

     

    shipping_methods.php

    <?php
    /*
    **GOOGLE CHECKOUT ** v1.4
    * @version $Id: shipping_methods.php 5342 2007-06-04 14:58:57Z ropu $
    * 
    */
     // this are all the available methods for each shipping provider, 
     // see that you must set flat methods too!
     // CONSTRAINT: Method's names MUST be UNIQUE
     // Script to create new shipping methods
     // http://demo.globant.com/~brovagnati/tools -> Shipping Method Generator
    
     $mc_shipping_methods = array(
    					'usps' => array(
    								'domestic_types' =>
    								  array(
    									  'Express' => 'Express Mail',
    									  'First Class' => 'First-Class Mail',
    									  'Priority' => 'Priority Mail',
    									  'Parcel' => 'Parcel Post'
    									   ),
    
    								'international_types' =>
    								  array(
    									  'GXG Document' => 'Global Express Guaranteed Document Service',
    									  'GXG Non-Document' => 'Global Express Guaranteed Non-Document Service',
    									  'Express' => 'Global Express Mail (EMS)',
    									  'Priority Lg' => 'Global Priority Mail - Flat-rate Envelope (large)',
    									  'Priority Sm' => 'Global Priority Mail - Flat-rate Envelope (small)',
    									  'Priority Var' => 'Global Priority Mail - Variable Weight Envelope (single)',
    									  'Airmail Letter' => 'Airmail Letter Post',
    									  'Airmail Parcel' => 'Airmail Parcel Post',
    									  'Surface Letter' => 'Economy (Surface) Letter Post',
    									  'Surface Post' => 'Economy (Surface) Parcel Post'
    									   ),
    									),
    					'fedex1' => array(
    								'domestic_types' =>
    								  array(
    									  '01' => 'Priority (by 10:30AM, later for rural)',
    									  '03' => '2 Day Air',
    									  '05' => 'Standard Overnight (by 3PM, later for rural)',
    									  '06' => 'First Overnight',
    									  '20' => 'Express Saver (3 Day)',
    									  '90' => 'Home Delivery',
    									  '92' => 'Ground Service'
    									   ),
    
    								'international_types' =>
    								  array(
    									  '01' => 'International Priority (1-3 Days)',
    									  '03' => 'International Economy (4-5 Days)',
    									  '06' => 'International First',
    									  '90' => 'International Home Delivery',
    									  '92' => 'International Ground Service'
    									   ),
    									),
    					'upsxml' => array(
    								'domestic_types' =>
    								  array(
    									  'UPS Ground' => 'UPS Ground',
    									  'UPS 3 Day Select' => 'UPS 3 Day Select',
    									  'UPS 2nd Day Air A.M.' => 'UPS 2nd Day Air A.M.',
    									  'UPS 2nd Day Air' => 'UPS 2nd Day Air',
    									  'UPS Next Day Air Saver' => 'UPS Next Day Air Saver',
    									  'UPS Next Day Air Early A.M.' => 'UPS Next Day Air Early A.M.',
    									  'UPS Next Day Air' => 'UPS Next Day Air'
    									   ),
    
    								'international_types' =>
    								  array(
    									  'UPS Worldwide Expedited' => 'UPS Worldwide Expedited',
    									  'UPS Saver' => 'UPS Saver'
    									   ),
    									),
    					'zones' => array(
    								'domestic_types' =>
    								  array(
    									  'zones' => 'Zones Rates'
    									   ),
    
    								'international_types' =>
    								  array(
    									  'zones' => 'Zones Rates intl'
    									   ),
    									),
    					'flat' => array(
    								'domestic_types' =>
    								  array(
    									  'flat' => 'Flat Rate Per Order'
    									   ),
    
    								'international_types' =>
    								  array(
    									  'flat' => 'Flat Rate Per Order intl'
    									   ),
    									),
    					'item' => array(
    								'domestic_types' =>
    								  array(
    									  'item' => 'Flat Rate Per Item'
    									   ),
    
    								'international_types' =>
    								  array(
    									   ),
    									),
    					'itemint' => array(
    								'domestic_types' =>
    								  array(
    									   ),
    
    								'international_types' =>
    								  array(
    									  'itemint' => 'Flat Rate Per Item intl'
    									   ),
    									),
    					'table' => array(
    								'domestic_types' =>
    								  array(
    									  'table' => 'Table'
    									   ),
    
    								'international_types' =>
    								  array(
    									  'table' => 'Table intl'
    									   ),
    									),
    					 'priority' => array(
    								'domestic_types' =>
    								  array(
    									  'priority' => 'Flat Rate Per Order'
    									   ),
    									   ),
    							  );
    
     $mc_shipping_methods_names = array(
    									 'usps' => 'USPS',
    									 'fedex1' => 'FedEx',
    									 'upsxml' => 'Ups',
    									 'zones' => 'Zones',
    									 'flat' => 'Flat Rate',
    									 'item' => 'Item',
    									 'priority' => 'Next Day',
    									 'itemint' => 'Item Inter',
    									 'table' => 'Table',
    									);
    
    ?>

     

    Any help is greatly appreciated.

     

    Kind regards

     

    p4rma

  7. Hello,

    Great contribution by the way. I only have one problem, Im using the latest OSC and have managed to pretty much get the whole contribution working. The only file giving me problems is order.php in classes. As when I try to update this file using the instructions the order total automatically goes to 0.

     

    My order.php shows the following code

            $shown_price = $currencies->calculate_price($this->products[$index]['final_price'], $this->products[$index]['tax'], $this->products[$index]['qty']);
           $this->info['subtotal'] += $shown_price;

     

    Where as the instructions ask me to edit the following code

            $shown_price = tep_add_tax($this->products[$index]['final_price'], $this->products[$index]['tax']) * $this->products[$index]['qty'];
           $this->info['subtotal'] += $shown_price;

     

    The contribution code does not have $currencies->calculate_price, I dont know if this is the only issue. I am using 2.2 RC1, if anyone knows a workaround it would be greatly appreciated it.

     

    Kind regards

     

    M PArmar

  8. I have just installed the ePDQ contribution which I downloaded from here

     

    http://www.oscommerce.com/community/contri...all/search,epdq

     

    However, once I have installed the contribution and configured the settings I am receiving the following error message when the site is directed to the ePDQ site.

     

    It is not possible to order from the store at this time.

    Please contact the merchant for further information.

    Error:

    Unable to read configuration file.

     

    Has anyone experienced this problem? If anyone has any suggestions please let me know.

     

    Regards

     

    parma

  9. Hello,

     

    I am using the VAT Display contribution, which is just what I wanted on my site. The link is shown below.

     

    http://www.oscommerce.com/community/contri.../search,exc+vat

     

    However, I am having one problem which is due to the fact that I am using Price break. This creates the problem of creating to many prices on the product categories and I think it would be quite confusing for a customer. To give you an idea of what it looks like I have linked a picture below;

     

    prices5hy.jpg

     

    Does anyone know how I could get the contribution to just show excluding prices? rather than including VAT prices aswell?

     

    I have tried to play around with the code which I have pasted below but with no luck.

    Thanks again, your help will be much appreciated.

     

    Kind regards

     

    M Parmar

     

    In catalog/product_info.php
    
    replace  
    	  if ($products_options['options_values_price'] != '0') {
    		$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
    	  }
    
    
    with
    
    	if ($products_options['options_values_price'] != '0') {
    		if (tep_session_is_registered('customer_id'))
    			{
    			$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->format(tep_add_tax($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) * 1 ).') ';
    	   		}
    	   	else
    	   		{
    			$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->format(tep_add_tax($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) * 1 ).' inc VAT) (' . $products_options['price_prefix'] . $currencies->format($products_options['options_values_price'] * 1 ).' ex VAT) ';
    		}
    	  }

     

    &

     

    In catalog/includes/classes/currencies.php
    replace
    	return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);
    
    with
    	global $customer_id;
      if (tep_session_is_registered('customer_id'))
      { return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);
    	} else {
    	$return_this=  $this->format(tep_add_tax($products_price, $products_tax) * $quantity) . ' (inc <a href="' . tep_href_link(FILENAME_VAT, '', 'NONSSL') . '">VAT</a>)<br /> ' . $this->format($products_price * $quantity) . '(ex <a href="' . tep_href_link(FILENAME_VAT, '', 'NONSSL') . '">VAT</a>)';
    		return $return_this;
      }

  10. I have managed to sort this out and now have my categories and then my shop name in the title bar :)

     

    Secondly I have read that the HTCA option only works for the index.php and that it adds the category name on the title. I cannot get this feature to work, I have tried ticking them all, just the HTCA and many other combinations.

     

    However, am still having problems with the following

     

    I have added a page for which I want to enter my header tags to however, once I have entered all the information and updated the tags the page is no longer working and gives me the following error.

    If I delete the tags then the page works again, I cant figure out what is wrong with the code on that line number

     

    I did fill tags and now am receiving the following error when going into any product info page

     

    Fatal error: Call to undefined function: clean_html_comments() in /home/gloveclu/public_html/includes/header_tags.php on line 187

     

    Hope someone knows whats going on.

     

    Regards

     

    M Parmar

  11. Hello,

     

    I have installed this contribution and everything seems to be fine apart from a couple of issues I am having problems with.

     

    I have added a page for which I want to enter my header tags to however, once I have entered all the information and updated the tags the page is no longer working and gives me the following error.

     

    Fatal error: Call to undefined function: tep_header_tag_page() in /home/gloveclu/public_html/includes/header_tags.php on line 353

     

    If I delete the tags then the page works again, I cant figure out what is wrong with the code on that line number

     

    // pdf.php
     case (strstr($_SERVER['PHP_SELF'],FILENAME_PDF) or strstr($PHP_SELF, FILENAME_PDF));
    $tags_array = tep_header_tag_page(HTTA_PDF_ON, HEAD_TITLE_TAG_PDF, 
    								  HTDA_PDF_ON, HEAD_DESC_TAG_PDF, 
    								  HTKA_PDF_ON, HEAD_KEY_TAG_PDF );
      break;

     

    Secondly I have read that the HTCA option only works for the index.php and that it adds the category name on the title. I cannot get this feature to work, I have tried ticking them all, just the HTCA and many other combinations.

     

    I would be grateful for any assistance.

     

    Regards

     

    M Parmar

  12. Hey,

     

    Currently using SPPC and Price Break for SPPC.

     

    Has anyone been able to get [Contribution] Purchase Order V2.3 or Dangling Carrot (Free Gift/Discount Contrib) contributions to work alongside SPPC?

     

    I really need to have a credit account on my site and if possible a free gift contribution that works with SPPC.

     

    Regards

     

    M Parmar

  13. Hello,

     

    I have just finished installing the Dangling Carrot Contribution. I have been using SPPC and Price break for SPPC. I have tried to merge the coding but am having some problems now :(

     

    I have managed to get the gifts box on the admin screen but with limited functionality as seen on the screenshot.danglingcarrot3bq.th.jpg

     

     

    catalog/includes/classes/shopping_cart.php is causing me a problem too, the SPPC has commented out some code which Dangling Carrot needs.

    This code starts on line 281, the first line as you can see has been commented out right through to the bottom of this code.

     

    /*		$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 . "'");
    	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'];
    	  } */

     

    I have tried taking out the comments so the code is live but I keep receiving the same error message

    Parse error: parse error, unexpected ';', expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/gloveclu/public_html/includes/classes/shopping_cart.php on line 392

     

    It is the same line that needs to be replaced by this code from the installation instructions.

    $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_carrot, 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 . "'");

     

    Since it stops my site from working for the time being I have put the comments back on.

     

    Would really appreciate it if someone could assist me with this.

     

    Kind regards

     

    M Parmar

×
×
  • Create New...