Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

  • 2 weeks later...

Hi All

 

I am using the default price break:

 

19.99:5,49.99:10,100000:20:

 

and for both total price of $25 and $55 I am getting a 20% discount rather than seeing a 10% and 20% discount respectively.

 

Have I installed something incorrectly?

Link to comment
Share on other sites

Hello Sam @@shoshoni,

 

I'm sorry, the package you are using contained wrong files. Discount by pricebreak is not included in SPPC Lite, only one fixed discount for all price ranges.

Please use the newest package SPPC Lite 2.0 uploaded on 6th November 2016.

 

rgds

Rainer

Link to comment
Share on other sites

Hello Raiwa @@raiwa

 

I noticed in admin if I copy and link a product to a new category and then afterwards delete the copied product in the new category the items SPPC pricing is also deleted(missing).

Only the normal retail price remains on the original product

 

Can this be confirmed or just me?

Getting the Phoenix off the ground

Link to comment
Share on other sites

Hello Pierre @@Peper,

 

I can't recreate this.

 

I did the following:

- copied product with defined SPPC individual price to another category (link option)

- both products have SPPC price

- deleted linked product only in the new category where I copied to

- original product still keeps it's SPPC individual price

 

DId you use the provided modified categories.php file or did you apply the modifications?

Anyway I checked and there is no SPPC lite modification in the related parts of the code.

 

Only issue is that if you use the copy product option instead of link, the SPPC price will not be copied. If I well remember I left it like this supposing that the copied product needs anyway a different SPPC price etablished and to keep the code changes reduced.

 

rgds

Rainer

Link to comment
Share on other sites

  • 6 months later...

Dear,

thank you for this great contribution.

I have a problem when activating the excluding shipping module, I receive the below error:

 

Warning: reset() expects parameter 1 to be array, null given in C:\xampp\htdocs\oscommerce\oscommerce-2.3.4\catalog\includes\classes\shipping.php on line 57

Warning: Variable passed to each() is not an array or object in C:\xampp\htdocs\oscommerce\oscommerce-2.3.4\catalog\includes\classes\shipping.php on line 58

could any one please help me with this?

 

Many thanks!

Kind regards

Gerry

Link to comment
Share on other sites

Hello Gerry @ghprosvs,

These warnings should be only displayed if you changed error reporting to: error_reporting(E_ALL);
in application_top.php

It should be : error_reporting(E_ALL & ~E_NOTICE); for live shops, so these kind of errors which do not prevend the code from working correct are not shown.

Anyway I checked this (it is always better to avoid even these kind of warnings) and I couldn't recreate the warning messages.

The indicated lines do also not fit with the provided SPPC Lite modified shipping.php class.

Can you please post your includes/classes/shipping.php

Please explain also on which page and under which conditions you get the error messages displayed.

EDITED: I could see the messages now when I exclude all installed shipping modules. It can be fixed, but does it make sense to exclude all shiiping modules? I would say at least one shipping module should be left available??

rgds

Rainer

Edited by raiwa
Link to comment
Share on other sites

Here the fix:

in the shipping class find:

    				$installed_modules = explode(';', MODULE_SHIPPING_INSTALLED);
    				for ($n = 0; $n < sizeof($installed_modules) ; $n++) {

replace by:

    				$installed_modules = explode(';', MODULE_SHIPPING_INSTALLED);
    				$shipment_array = array();
    				for ($n = 0; $n < sizeof($installed_modules) ; $n++) {

rgds

Rainer

Link to comment
Share on other sites

  • 1 month later...
  • 9 months later...

New version Wholesale (SPPC Lite) 3.0 uploaded:

https://apps.oscommerce.com/VWUpG

 

Compatibility:
Responsive 2.3.4.1 BS CE Frozen
PHP 7.0-7.2
-------------------------------------------------------------------------------------------------------------
Older 2.3.4.(1.) versions please use Wholesale (SPPC Lite) 2.0
or update to 2.3.4.1 BS CE Frozen at least:
- full modularized index.php
- full modularized product_info.php
NOTE: manual file modifications will not match code references, please modify on your own criteria
-------------------------------------------------------------------------------------------------------------------------------

Change log:
Version 3.0:

- Updated for Responsive 2.3.4.1 BS CE Frozen
- Updated product info modules
- All modules separated in own modules, no core module modifications
- Payment and shipping class modifications moved into class extensions. No more core class modifications required
- Removed support for all previous versions
- Added suport for PWA Guest checkout, hide retailer message for guests during checkout.
- Changed message tex input fields to textarea for easier edit.

Link to comment
Share on other sites

  • 2 months later...

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

Getting the Phoenix off the ground

Link to comment
Share on other sites

@Peper,

Wholesale SPPC Lite is not based on the old SPPC add-on. It doesn't support individual customer settings neither is it possible to apply old SPPC modifications.

Edited by raiwa
Link to comment
Share on other sites

@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

dealer.jpg.40bed73f7be6520c75d8907d2507442e.jpg

 

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

Getting the Phoenix off the ground

Link to comment
Share on other sites

I have the pro version and I made a thing like this, but I don't know if it is the best way (I am not a programmer) :

In your admin/includes/languages/THE_LANGUAGE_USED/categories.php :

// WholeSale add by Fred
$wholesalename = array('Revendeur','Club');
// WholeSale add by Fred EOF

Do the same thing for all your languages.

In admin/categories.php (my categories file is very modified, but this is the spirit) :

						<!-- wholesale pro BEGIN-->
<?php
          for ($i=1; $i<=MODULE_STORE_WHOLESALE_GROUPS; $i++) {
          	$products_ws_prices = 'products_ws_price_' . $i;
?>
          <tr>
            <td class="main"><?php echo $wholesalename[$i-1] . ' '. constant('MODULE_STORE_WHOLESALE_PRICE_NET_' . strtoupper($language)) . ' ' . $i . ': '; ?></td>
            <td class="main"><?php echo tep_draw_input_field('products_ws_price_' . $i, $pInfo->$products_ws_prices, 'onkeyup="updateGrossWS' . $i . '()"'); ?></td>
            <td class="main"><?php echo $wholesalename[$i-1] . ' '. constant('MODULE_STORE_WHOLESALE_PRICE_GROSS_' . strtoupper($language)) . ' ' . $i . ': '; ?></td>
            <td class="main"><?php echo tep_draw_input_field('products_ws_price_gross_' . $i, $pInfo->$products_ws_prices, 'onkeyup="updateNetWS' . $i . '()"'); ?></td>
          </tr>
<?php
}
?>
          <!-- wholesale pro END-->

 

 

whosalename.jpg

Edited by bonbec
Add picture

with OsC 2.2 since 2006 ...

Link to comment
Share on other sites

4 hours ago, Peper said:

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

@Peper,

For a generic solution this would require an extra table/column in the databese. I will think about in the next update. But this add-on was intended to be as simple as possible and I'm trying not to get it overingeneered like the old SPPC add-on. Each user wishes some addition and at the end it will be the same complicate like SPPC.

I believe you could just give a post-it to your other admins which they can stick at the screen with the group number and the human understandable descriptive group name 😉

Link to comment
Share on other sites

@Peper, just realised, this should be discussed by direct mail, not here in the public forum.

Link to comment
Share on other sites

@raiwa

Hi,

thank you very much for this addon.

I orginal tried the addons.oscommerce.com/info/0716
almost done, but spend nearly a day still can not make the special price show correctly instead of 0.00, so gave up and found this addon.

It showes the customer, just found a tiny warning:

Warning: constant(): Couldn't find constant MODULE_STORE_WHOLESALE_ENTRY_WHOLESALE_ENGLISH

does it mean need to define inside english folder?

 

thanks! Lyn

Link to comment
Share on other sites

Link to comment
Share on other sites

5 hours ago, raiwa said:

@ce7Hello Lyn,

Did you install the store module?

@raiwa        Yes I did.

And this error message is showing when you click on admin/customers

it will show admin/customers.php, on the grey heading area, it will show this error message, i still be able to click on individual customer name, but i like to learn how to fix with constant, tried google but can get similar post and learn how to fix it myself....so come here to ask for help 🙂

Thanks Lyn

Link to comment
Share on other sites

@ce7,

I do not get this warning on my test store, even with error reporting set to all.

Is it possible that you installed the store module before you defined english as a store language?

Can you please try to uninstall the store module and reinstall it. The constant should be auto created for all store languages and saved as a configuration constant in the database. You can't fix it manually.

rgds

Rainer

Link to comment
Share on other sites

Uploaded update Version 3.0.3.:
-    Fixed incompatibility issue with third party payment modules

 

Link to comment
Share on other sites

On 8/19/2018 at 5:14 AM, raiwa said:

@ce7,

I do not get this warning on my test store, even with error reporting set to all.

Is it possible that you installed the store module before you defined english as a store language?

Can you please try to uninstall the store module and reinstall it. The constant should be auto created for all store languages and saved as a configuration constant in the database. You can't fix it manually.

rgds

Rainer

@raiwa

Thank you for reply and sorry not be online for a while!
I did uninstalled the store. however now i am having new problem, after uninstall, i trying to install and this is the error message i have

 

Fatal error: Uncaught exception 'mysqli_sql_exception' with message 'Duplicate entry '0' for key 'PRIMARY'' in /home/mysite.com/admin/includes/functions/database.php:55 Stack trace: #0 /home/mysite.com/admin/includes/functions/database.php(55): mysqli_query(Object(mysqli), 'insert into con...') #1 /home/mysite.com/includes/modules/store/st_wholesale.php(81): tep_db_query('insert into con...') #2 /home/mysite.com/admin/modules.php(54): st_wholesale->install() #3 {main} thrown in /home/mysite.com/admin/includes/functions/database.php on line 55

I haven't change any code with the files...not sure what is going on...

 

Lyn

Link to comment
Share on other sites

@ce7,

Please check that in your database, in the configuration table, auto_increment is set for configuration_id

Link to comment
Share on other sites

On 8/27/2018 at 4:49 PM, raiwa said:

@ce7,

Please check that in your database, in the configuration table, auto_increment is set for configuration_id

@raiwa

Thank you very much! Yes, I have lots of problem in DB and trying to fix it these couple days! Thank you for point it out! After fix the old ones, i will come back to test this addon.

Lyn

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...