Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

add on help


Guest

Recommended Posts

Posted

Hi

 

I installed the following add on for my 2.3.1 store but am getting the following error when I click on edit for Points Redeemptions in the order total under modules

 

http://addons.oscommerce.com/info/3220

 

Warning: reset() expects parameter 1 to be array, null given in /customers/d/a/8/worldofcosmetics.co.uk/httpd.www/admin/modules.php on line 227 Warning: Variable passed to each() is not an array or object in /customers/d/a/8/worldofcosmetics.co.uk/httpd.www/admin/modules.php on line 228

 

Also when I click save I get the following error

 

 

Warning: reset() expects parameter 1 to be array, null given in /customers/d/a/8/worldofcosmetics.co.uk/httpd.www/admin/modules.php on line 35 Warning: Variable passed to each() is not an array or object in /customers/d/a/8/worldofcosmetics.co.uk/httpd.www/admin/modules.php on line 36 Warning: Cannot modify header information - headers already sent by (output started at /customers/d/a/8/worldofcosmetics.co.uk/httpd.www/admin/modules.php:35) in /customers/d/a/8/worldofcosmetics.co.uk/httpd.www/admin/includes/functions/general.php on line 34

 

Also I am getting no text regarding the points redeem as on my other customers website I am, instead on my website I am getting a long rectangle with a border and nothing in it

 

Can anyone help

 

Kind regards

 

Ian

Posted

@@ianhaney

 

Most likely a instillation error. You have to go over the install step again and verify that all changes are done correctly. And verify that the addon is for 2.3.1 if not you have to check all code for alterations and change it accordingly.

 

"headers already sent" you find enough help in the forum, just search.

White spaces in code, before and after php closing tags.

Posted

Hi Arild, I have fixed the headers already sent message, just got this one to solve now

 

Warning: reset() expects parameter 1 to be array, null given in /customers/d/a/8/worldofcosmetics.co.uk/httpd.www/admin/modules.php on line 35 Warning: Variable passed to each() is not an array or object in /customers/d/a/8/worldofcosmetics.co.uk/httpd.www/admin/modules.php on line 36

 

In admin/modules.php on line 35 is

 

reset($HTTP_POST_VARS['configuration']);

 

and on line 36 is

 

while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) {

 

Any ideas

 

I have not touched them files in the installation of the add on so am bit confused

Posted

@@ianhaney

 

I am not sure, but can it be that the values comes from the DB.

 

When you install this module did you check the "configuration group ID is 16" as desscribed in install.txt.

Posted

Not sure will check it now, do I do that by going into the phpmyadmin and checking the id number in there for that table

Posted

Just looked in the database and says Points/RewardsV2.1rc2a is configuration_group_id 16

Posted

@@ianhaney

 

Yes, but the point is if there was one with configuration_group_id 16 from before.

Try this search in phpmyadmin and see if all result is related to the addon you installed.

 

SELECT *
FROM `configuration`
WHERE `configuration_group_id` =16
LIMIT 0 , 30
Posted

yeah all the results came back to do with the add on

 

I am removing it to be honest as I can't even log in to the admin now where as I could before the add on

Posted

@@ianhaney

 

Then it is most likely a failure when installing where line are moved or functions braked.

Most error after installing a addon is due to mistakes, not replacing the correct code, or add it at right place.

 

And the addon must be for the right version, or all code that are replaced must be checked for alterations so it fits your version.

Posted

@@ianhaney

I also tried to add this to a 2.3 version site, and gave up after spending too long getting it to work, so its not just you. After all the hassle it gave me I almost changed to opencart which comes with most things already added, but didnt.

 

@@www.in.no

I did check each line of code before altering and still it didnt work, so that was not the fault. The version was wrong, but someone had to have a go at updating it.

REMEMBER BACKUP, BACKUP AND BACKUP

Posted

@@14steve14 and @@ianhaney

 

I se that there are 2 packages that says it is for 2.3 version, have you checked both for differences... I see one is having extra information for step 18 for it to work with 2.3

Posted

Hi Steve you ok

 

I agree it seemed more hassle to get it work so easier to remove it all so has all gone now but am left with getting this error when I click edit for sub total in modules/order total in the admin side

 

Warning: reset() expects parameter 1 to be array, null given in /customers/d/a/8/worldofcosmetics.co.uk/httpd.www/admin/modules.php on line 227 Warning: Variable passed to each() is not an array or object in /customers/d/a/8/worldofcosmetics.co.uk/httpd.www/admin/modules.php on line 228

 

Giving me headache now lol

Posted

Yeah I checked both of the files for 2.3 and did the extra part for 2.3. in step 18 and still no joy

 

I uploaded the backup files I had

 

Need to fix this error though somehow

Posted

Hi all!

 

I have exactly the same problem as ianhaney... just installed the addon we're talking about (http://addons.oscommerce.com/info/3220), and it seems to be working(?), except i can't add the module on modules.php?set=order_total page...

I click on Install module on the top, then choose "Points Redeemptions", click on "Edit", and...

 

Warning: reset() [function.reset]: Passed variable is not an array or object in /webaruhaz/admin/modules.php on line 235

Warning: Variable passed to each() is not an array or object in /webaruhaz/admin/modules.php on line 236

 

Any idea what could cause the problem? I'm using osCommerce 2.3.2. Thanks for any help, i really appreciate it...

 

Edit: it isn't working correctly as it should, can't seem to automatically add the points after a purchase... it displays the correct amount & value of points on the product(s) page, and i can manually give any points to any user using the Admin page (which is shown correctly on account/my points), but can't see any points in the list of "Customers Pending Points" (customers_points_pending.php) after a purchase - maybe it is because the incomplete module installation, or it shouldn't affect it this much? Looks like a mod error to me...

Posted

* please take no notice of my "Edit" part regarding the previous post, the failure of the automatic point addition was an installation error (just needed to remove the "($payment_modules->selected_module != $payment) || (" line(s) from the original source of checkout_confirmation.php & checkout_process.php), thats all. *

 

The warnings are still there on the admin panel though... :(

Posted

Hi Bluestar

 

So glad I wernt the only one who has a issue with the add on, it's weird it installed and works perfect on a unmodified store which is 2.3.1 but when I installed it on my modified 2.3.1 store that is when I got the issues

 

I have taken it off for now until is working perfect on a 2.3.1 modified store

Posted

Still having this problem, just can't manage to fix it... :( ianhaney, have u succesfully fixed the problem? Could somebody help please?

 

It shows these error after clicking on "Edit" button in Modules / Order Total (can't even see the points on the checkout page, though the admin panel says it's installed, but its not on the list next to "Subtotal", "Total" etc...):

 

Warning: reset() [function.reset]: Passed variable is not an array or object in /webaruhaz/admin/modules.php on line 236

 

Warning: Variable passed to each() is not an array or object in /webaruhaz/admin/modules.php on line 237

 

 

The problem is at:

// modules.php

 

switch ($action) {

case 'edit':

$keys = '';

reset($mInfo->keys); // <- line 236 : reset() [function.reset]: Passed variable is not an array or object

while (list($key, $value) = each($mInfo->keys)) { // <- line 237 : Variable passed to each() is not an array or object

$keys .= '<strong>' . $value['title'] . '</strong><br />' . $value['description'] . '<br />';

 

 

 

By the way the passed key is:

 

// ot_redemptions.php

 

function keys() {

return array('MODULE_ORDER_TOTAL_REDEMPTIONS_SORT_ORDER'); // <- this one, as it is in the unmodified latest file

}

 

 

Please help me, what should i check for? Its driving me nuts... :(

Posted

Hi Bluestar

 

I didn't manage to fix it so just uploaded all the backup files before I installed that add on

 

Sorry couldn't help further, hope you get it fixed real soon

 

Ian

Posted

@ianhaney Although I don't have experience with the afore mentioned addon it reminds me of a related problem with an install of mine that has led to an addon of my own. My problem was that with a slightly modified shop two addons wern't working. The problem was that both addons used the same file and did not include instructions for modifying the file. [both contributions loaded up different versions of the same file.] The Solution was to look at both addons and see what files were used. I suspect this is the same problem you have going on here, one of your other addons is using the same file as this addon. It is a pain in the arse to find it,but might be worth it. Some developers modify the default function files of OsCommerce, and without proper install instructions gives all sort of errors.

Always backup your files! You will be glad you did

My add-ons :

SSPP Seperate Shipping Per Product v2.5| Support
Gift vouchers for SPPC 4.22 v2.1 | Support |
Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |
HTML Mail v2.0 | Support |




Upcoming Add ons:

Addon Manager |
Separate Pricing Per Product Qty |
Coupon Populate |
EZ-PDF Catalog

Posted

ok I have narrowed down the problem code to be in catalog/includes/modules/order_total/ot_redemptions.php

 

Once I commented out this code (see //) it allowed me to install the order total module and then removed the // and saved the file allowed the order total to function.

 

// if customer is using points to pay
    //if (isset($customer_shopping_points_spending) && is_numeric($customer_shopping_points_spending) && ($customer_shopping_points_spending > 0)) {
 //    $order->info['total'] = number_format($order->info['total'] - tep_calc_shopping_pvalue($customer_shopping_points_spending), 4);
 //    $order->info['payment_method'] = ( $order->info['total'] > 0) ? $order->info['payment_method'] . '+' . str_replace(':', '', TEXT_POINTS) : str_replace(':', '', TEXT_POINTS);
	 $this->output[] = array('title' =>''. MODULE_ORDER_TOTAL_REDEMPTIONS_TEXT . ':',
							    'text' => '<span class="pointWarning">-' . $currencies->format(tep_calc_shopping_pvalue($customer_shopping_points_spending), true, $order->info['currency'], $order->info['currency_value'].'</span>'),
							    'value' => tep_calc_shopping_pvalue($customer_shopping_points_spending));
    //}
   }

 

try it and see while I try and work on a fix, unless someone gets there before me :thumbsup:

 

Mark

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...