Jump to content
Latest News: (loading..)

Peper

Members
  • Content count

    503
  • Joined

  • Last visited

About Peper

Profile Information

  • Real Name
    Pierre
  • Gender
    Male
  • Location
    South Africa
  • Website

Recent Profile Visitors

24,019 profile views
  1. Peper

    Limit or surcharge for shipping module

    I see however it returns false on this: e.g. Admin Postcode Surcharge: 1735, 1745, 1753 if (in_array($order->delivery['postcode'], MODULE_SHIPPING_DLYC_POST_ID)) { $shipping_rate = ($shipping_rate * MODULE_SHIPPING_DLYC_SURCHARGE) * $shipping_num_boxes; } tried: if (in_array($order->delivery['postcode'], array(MODULE_SHIPPING_DLYC_POST_ID)) { or is both the above going south?
  2. Peper

    Limit or surcharge for shipping module

    Don't forsure know if this is the best way but seems to work if (MODULE_SHIPPING_DLYC_MODE == 'weight') { $adm_array = explode(',', MODULE_SHIPPING_DLYC_POST_ID); $col = 0; for ( $i=0, $n=sizeof($adm_array); $i<$n; $i++ ) { $adm = $adm_array[$i]; if ((MODULE_SHIPPING_DLYC_SURCHARGE_ENABLE == true) and ($adm == $order->delivery['postcode'])) { $shipping_rate = ($shipping_rate * MODULE_SHIPPING_DLYC_SURCHARGE) * $shipping_num_boxes; } } } else { $shipping_rate = $shipping_rate * $shipping_num_boxes; } Any other suggestions please do post!
  3. Peper

    Limit or surcharge for shipping module

    progress i guess. if (MODULE_SHIPPING_DLYC_MODE == 'weight') { $adm_array = explode(',', MODULE_SHIPPING_POST_ID); $col = 0; for ( $i=0, $n=sizeof($adm_array); $i<$n; $i++ ) { $adm = $adm_array[$i]; if ((MODULE_SHIPPING_DLYC_SURCHARGE_ENABLE == True) && ($adm == $order->delivery['postcode'])) { $shipping_rate = ($shipping_rate * MODULE_SHIPPING_DLYC_SURCHARGE) * $shipping_num_boxes; } else { $shipping_rate = $shipping_rate * $shipping_num_boxes; now last bit: I added enable disable bit. just to get this working somehow: if ((MODULE_SHIPPING_DLYC_SURCHARGE_ENABLE == True) && ($adm == $order->delivery['postcode'])) {
  4. Busy to add a surcharge for one of my shipping modules. However i'm not getting this to work as imagined I have added the additional config for this shipping module tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Postal Surcharge', 'MODULE_SHIPPING_DLYC_POST_ID', '0001, 0002', 'Insert post code and comma seperate them', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Amount to Surcharge', 'MODULE_SHIPPING_DLYC_SURCHARGE', '1.3', 'Enter multiplication value eg. 1.2', '6', '0', now())"); if (MODULE_SHIPPING_DLYC_MODE == 'weight') { // $post_sur = MODULE_SHIPPING_DLYC_POST_ID ; $post_sur = str_replace (' ', '', MODULE_SHIPPING_DLYC_POST_ID); $post_sur = preg_split ('/,/', MODULE_SHIPPING_DLYC_POST_ID); if (post_sur == $order->delivery['postcode']) { $shipping_rate = ($shipping_rate * MODULE_SHIPPING_DLYC_SURCHARGE) * $shipping_num_boxes; } else { $shipping_rate = $shipping_rate * $shipping_num_boxes; So then if a customer postal code matches MODULE_SHIPPING_DLYC_TOWN_ID as defined in admin then adds a small surcharge (couriers charging a special trip) Any help on this please Thanks
  5. Peper

    Wholesale (SPPC lite)

    Hello Rainer Please if you can help with the following, for old SPPC i used in admin/customers.php to allocate specific shipping options and payment options to some individual customers. The SPPC lite only made this a global option per group This code was removed from /classes/shipping.php and similar to payment.php to update to lite version How to modify for old code to lite version? $customer_shipment_query = tep_db_query("select customers_wholesale, customers_payment_allowed, customers_shipment_allowed from customers....?? // BOF Separate Pricing Per Customer, next line original code $this->modules = explode(';', MODULE_SHIPPING_INSTALLED); global $customer_id; if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') { $customer_group_id = $_SESSION['sppc_customer_group_id']; } else { $customer_group_id = '0'; } $customer_shipment_query = tep_db_query("select IF(c.customers_shipment_allowed <> '', c.customers_shipment_allowed, cg.group_shipment_allowed) as shipment_allowed from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_GROUPS . " cg where c.customers_id = '" . $customer_id . "' and cg.customers_group_id = '" . $customer_group_id . "'"); if ($customer_shipment = tep_db_fetch_array($customer_shipment_query) ) { if (tep_not_null($customer_shipment['shipment_allowed']) ) { $temp_shipment_array = explode(';', $customer_shipment['shipment_allowed']); $installed_modules = explode(';', MODULE_SHIPPING_INSTALLED); for ($n = 0; $n < sizeof($installed_modules) ; $n++) { // check to see if a shipping module is not de-installed if ( in_array($installed_modules[$n], $temp_shipment_array ) ) { $shipment_array[] = $installed_modules[$n]; } } // end for loop $this->modules = $shipment_array; } else { $this->modules = explode(';', MODULE_SHIPPING_INSTALLED); } } else { // default $this->modules = explode(';', MODULE_SHIPPING_INSTALLED); } // EOF Separate Pricing Per Customer @raiwa
  6. Peper

    Mail Manager

    When adding SMTP i'm not getting results as planned. My store is using html email addon and have to stick to sendmail Try this SMTP addon
  7. Peper

    Mail Manager

    Hello @fourmat This was a while back and is working fine for me at least (Admin-E-Mail Transport Method = sendmail) Will have a look this weekend again on the SMTP side(my preferred way) if (EMAIL_TRANSPORT == 'smtp') { return mail($to_addr, $subject, $this->output, 'From: ' . $from . $this->lf . 'To: ' . $to . $this->lf . implode($this->lf, $this->headers) . $this->lf . implode($this->lf, $xtra_headers)); } else { return mail($to, $subject, $this->output, 'From: '.$from.$this->lf.implode($this->lf, $this->headers)); //return mail($to, $subject, $this->output, 'From: '.$from.$this->lf.implode($this->lf, $this->headers).$this->lf.implode($this->lf, $xtra_headers)); } }
  8. Peper

    Bundled products

    Display bundle special price and calculate correct savings <table border="0" width="95%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main" colspan="5"><strong> <?php $bundle_sum = 0; echo TEXT_PRODUCTS_BY_BUNDLE . "</strong></td></tr>\n"; $bundle_query = tep_db_query("select pd.products_name, pb.*, p.products_bundle, p.products_id, p.products_model, p.products_price, p.products_image, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_quantity as in_stock, if(s.status, 1, 0) as is_special, p.products_tax_class_id FROM products p INNER JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON p.products_id=pd.products_id INNER JOIN products_bundles pb ON pb.subproduct_id=pd.products_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id and p.products_status = '1' where pb.bundle_id = " . (int)$bundle_id . " and language_id = '" . (int)$languages_id . "'"); while ($bundle_data = tep_db_fetch_array($bundle_query)) { echo '<tr><td class="main" valign="top">' ; echo '<a href="' . tep_href_link('product_info.php', 'products_id=' . $bundle_data['products_id']) . '" target="_blank">' . tep_image('images/' . $bundle_data['products_image'], $bundle_data['products_name'], intval(SMALL_IMAGE_WIDTH / 2), intval(SMALL_IMAGE_HEIGHT / 2), 'hspace="1" vspace="1"') . '</a></td>'; // comment out the following line to hide the subproduct qty echo '<td class="main" align="right"><strong>' . $bundle_data['subproduct_qty'] . "&nbsp;x&nbsp;</strong></td>"; echo '<td class="main"><a href="' . tep_href_link('product_info.php', 'products_id=' . $bundle_data['products_id']) . '" target="_blank"><strong>&nbsp;(' . $bundle_data['products_model'] . ') ' . $bundle_data['products_name'] . '</strong></a>'; if ($bundle_data['products_bundle'] == "yes") display_bundle($bundle_data['subproduct_id'], $bundle_data['products_price']); echo '</td>'; if (tep_not_null($bundle_data['specials_new_products_price'])) { echo '<td align="right"><span style="color:red"><s><strong>&nbsp;' . $currencies->display_raw($bundle_data['products_price'], tep_get_tax_rate($bundle_data['products_tax_class_id'])) . "</s></span>&nbsp;&nbsp;"; echo '' . $currencies->display_price($bundle_data['specials_new_products_price'], tep_get_tax_rate($bundle_data['products_tax_class_id'])) . "</strong></td></tr>\n"; } else { echo '<td align="right" class="main"><strong>&nbsp;' . $currencies->display_price($bundle_data['products_price'], tep_get_tax_rate($bundle_data['products_tax_class_id'])) . "</strong></td></tr>\n"; } if ($bundle_data['specials_new_products_price'] > '0') { $bundle_sum += $bundle_data['specials_new_products_price']*$bundle_data['subproduct_qty']; } else { $bundle_sum += $bundle_data['products_price']*$bundle_data['subproduct_qty']; } } $bundle_saving = $bundle_price - $bundle_sum; $bundle_sum = $currencies->display_price($bundle_sum, tep_get_tax_rate($product_info['products_tax_class_id'])); $bundle_saving = $currencies->display_price($bundle_saving, tep_get_tax_rate($product_info['products_tax_class_id'])); // comment out the following line to hide the "saving" text echo '<tr><td colspan="5" class="main"><p><strong>' . TEXT_RATE_COSTS . '&nbsp;' . $bundle_sum . '</strong></td></tr><tr><td class="main" colspan="5" style="color:red"><strong>' . TEXT_IT_SAVE . '&nbsp;' . $bundle_saving . "</strong></td></tr>\n"; ?> </table></td> </tr> </table>
  9. Peper

    Pictures side by side

    Try under admin=>Headertags=>Colorbox Script and set Thumbnail layout to 222 This will give 2 images side by side for max 6 images
  10. Peper

    KissIT Image Thumnailer

    Ok, now that makes sense. No wonder for many image problems
  11. Peper

    KissIT Image Thumnailer

    @raiwa Ok, I see now. i checked on a default install of CE frozen, the main image also is added in admin and the result is the same as what i'm getting Your addon is doing what it should but as soon as there are 2 or more images added in admin the 1st image is omitted and does not display in catalog What is the purpose for the Products "Main Image" in admin
  12. Peper

    KissIT Image Thumnailer

    @raiwa Rainer, I've been doing it wrong for few years, that's how I thought it should work. So you are saying load the cm_pi_gallery.php and the cm_pi_gallery_kissit.php for products page. What does this code do in cm_pi_gallery_kissit? I can see its calling the main image $product_info['products_image'] - or is it ..else { if no smaller images show main image only else { list($width, $height) = file_exists('images/' . $product_info['products_image'])? getimagesize('images/' . $product_info['products_image']) : array(150,150); $pi_output .= '<div class="piGal">'; ...
  13. Peper

    KissIT Image Thumnailer

    Hello @raiwa For some unknown reason my products main image does not load/display when there are more images for the product. Colorbox layout = 1113 Now stuck trying to find what is the cause I have disabled as many page modules and Header Tags as I can Using older site merged with Frozen updates In Chrome inspect also no reference to main image <?php echo $pi_output; echo '1 product id: ' . $product_info['products_id'] . '<br>' . '2 pi_counter = ' . $pi_counter . '<br>'. '3 kW x kH: ' . KISSIT_MAIN_PRODUCT_IMAGE_WIDTH .' x ' . KISSIT_MAIN_PRODUCT_IMAGE_HEIGHT . '<br>' . '4: products_image = ' . $product_info['products_image'] . '<br>'; ?> So then: 1 product id: 2043 2 pi_counter = 1 3 kW x kH: 250 x 250 4: products_image = Front_big.jpg I have not used any htmlcontent for any images Please let me know if anything comes to mind on this, I would appreciate it.
  14. I have it working on CE after a few changes I have modified it also with extra feature so that a customer can convert wishlist into a printable quotation
  15. Peper

    Header Tags SEO

    HT SEO for frozen version? I do no necessarily want to drop this addon as Google and other search engine progresses, whether tags carry some weight or nothing Few good uses remains for this addon The same with USU5 sitemap, as a user i don't want to see some product_info.php?products_id=3713. Users can go back easily by typing in name of product and chrome does the rest - link discussion A few more corrections will be handy, please help. Notice errors in admin - HTC page control: Notice: Undefined index: products , Undefined index: cats, Undefined index: manu in includes\functions\header_tags.php Notice: Undefined index: line \includes\functions\header_tags.php on line 237 Notice: Undefined index: pseudo \includes\functions\header_tags.php on line 330 Next: The FILENAME_ issues deprecated in includes/header_tags.php when updating admin/header_tags_seo.php , messes up FILENAME links Next: header_tags_seo_silo.php = couple of Notice: Undefined Next: changed: admin/categories.php $category_inputs_string = $category_description_string = $category_seo_description_string = $category_seo_keywords_string = $category_seo_title_string = ''; to $category_inputs_string = $category_description_string = $category_seo_description_string = $category_seo_keywords_string = $category_seo_title_string = $category_htc_title_string = $category_htc_title_alt_string = $category_htc_title_url_string = $category_htc_desc_string = $category_htc_keywords_string = $category_htc_breadcrumb_string = $headertags_editor_str = $category_htc_description_string = ''; Catalog: Catalog - product page errors: Notice: Undefined offset: 3 in \includes\functions\header_tags.php on line 115 Notice: Undefined offset: 3 in \includes\functions\header_tags.php on line 116 Notice: Undefined offset: 3 in \includes\functions\header_tags.php on line 120 Notice: Undefined offset: 3 in \includes\functions\header_tags.php on line 124 Starting with 115: $header_tags_array['title_alt'] = (tep_not_null($the_product_info['products_head_title_tag_alt'])) ? strip_tags($the_product_info['products_head_title_tag_alt']) : (HEADER_TAGS_USE_PAGE_NAME == 'false' ? strip_tags($the_product_info['products_head_title_tag']) : strip_tags($the_product_info['products_name'])); $tmpTags['prod_desc'] = (tep_not_null($the_product_info['products_head_desc_tag'])) ? strip_tags($the_product_info['products_head_desc_tag']) : ''; if (HEADER_TAGS_ENABLE_ADDITIONAL_WORDS == 'true') { $add_kwrds = ''; if (isset($the_product_info['products_head_keywords_tag'][0]) && tep_not_null($the_product_info['products_head_additional_words'])) { $add_kwrds = HEADER_TAGS_SEPARATOR_KEYWORD . $the_product_info['products_head_additional_words']; Homepage - index.php errors: includes\header_tags.php Notice: Undefined index: manufacturers_id Notice: Undefined variable: args includes\functions\header_tags.php on line 167 function GetCanonicalURL() { global $request_type; $parts = explode("&", $_SERVER['QUERY_STRING']); $cnt = count($parts); if ($cnt == 1 && basename($_SERVER['SCRIPT_FILENAME']) === 'index.php') { //home page global $cPath,$category_depth; if (tep_not_null($cPath) || (isset($_GET['manufacturers_id']) && $category_depth == 'top')) { $args = tep_get_all_get_params(array('action','currency', tep_session_name(),'cPath','manufacturers_id','sort','page', 'language')); return StripSID(tep_href_link('index.php', $args, $request_type, false) ); } $url = StripSID(tep_href_link('/', $args, $request_type, false) ); if (substr($url, -2) == '//') { $url = substr($url, 0, -1); //remove duplicate slashes } return $url; } $args = tep_get_all_get_params(array('action','currency', tep_session_name(),'cPath','manufacturers_id','sort','page', 'language')); return StripSID(tep_href_link(basename($_SERVER['SCRIPT_FILENAME']), $args, $request_type, false) ); }
×