Jump to content
Latest News: (loading..)

Peper

Members
  • Content count

    506
  • Joined

  • Last visited

About Peper

  • Birthday 11/28/1975

Profile Information

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

Recent Profile Visitors

24,136 profile views
  1. Hello Rainer @raiwa the following code gives error in admin side: open_basedir restriction in effect Warning: is_dir(): open_basedir restriction in effect. File(/usr/www/users/mspggy/..) is not within the allowed path(s): (/usr/www/wwws/users/mspggy:/usr/wwws/users/mspggy:/usr/www/users/mspggy:/usr/home/mspggy:/usr/local/rmagic:/usr/www/users/he/_system_:/usr/share/php:/usr/local/lib/php:/tmp:/usr/bin:/usr/local/bin:/usr/local/share/www:/usr/www/share/www:/usr/share/misc:/dev/urandom) in /usr/www/users/mspggy/includes/modules/content/header/cm_header_holiday.php on line 139 This started happening after i changed to a new server with tighter security, any possible workaround for this? Also noticed there a couple modules with this code $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.')); $files_array = array(); if ($dir = @dir(DIR_FS_CATALOG)) { while ($file = $dir->read()) { if (!is_dir(DIR_FS_CATALOG . $file)) { if (substr($file, strrpos($file, '.')) == $file_extension) { $files_array[] = $file; } } } sort($files_array); $dir->close(); }
  2. Peper

    Managing your Products

    I find it easier to allocate products to manufacturers grouped to suppliers. Also created for products a part number code that i can use for reference to the suppliers items price list instead of model only. For mass update csv by manufacturer then. For smaller updates as we purchase we also now and then update individual products. What will work for me is to create excel sheet that automatically matches the part numbers to the suppliers part number and hopefully just copy and paste pricing Updating attributes is more of a nightmare, one by one, although most of my attributes is an actual product. So here updating something that could have been easier - attributes you have downloads, sizes and so but how about selecting a product from the catalog? Pierre
  3. Peper

    Wholesale (SPPC lite)

    @raiwa Hello Rainer Small short coming on the pro version. In admin products edit or new, the dealer pricing will show as: for ($i=1; $i<=MODULE_STORE_WHOLESALE_GROUPS; $i++) { $products_ws_prices = 'products_ws_price_' . $i; resulting in I know what is going on here but what about other admin's? This makes no sense, can this rather be given a naming instead of 1, 2 or 3? So to make it easier for humans to differentiate, example instead of 1 to read Wholesale -Small, 2 = Wholesale medium, 3 = wholesale large Thanks
  4. 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?
  5. 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!
  6. 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'])) {
  7. 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
  8. 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
  9. 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
  10. 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)); } }
  11. 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>
  12. 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
  13. Peper

    KissIT Image Thumnailer

    Ok, now that makes sense. No wonder for many image problems
  14. 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
  15. 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">'; ...
×