Post by zsunsun » Tue Jun 22, 2010 3:39 pm

Hi, whenever I try to check out I get this message

Notice: Undefined index: subtract in /~~~~/~~~~/public_html/Opencart/catalog/model/checkout/order.php on line 75

I searched and found someone mentioning that missing 'subtract' field in product page is causing problem. But I actually do have 'subtract' field when I checked 'product' through phpmyadmin.

I looked through order.php file to see if there is any typos but I couldn't find any.

BTW, line 75 on order.php looks like this if it helps..

$this->db->query("INSERT INTO " . DB_PREFIX . "order_product SET order_id = '" . (int)$order_id . "', product_id = '" . (int)$product['product_id'] . "', name = '" . $this->db->escape($product['name']) . "', model = '" . $this->db->escape($product['model']) . "', price = '" . (float)$product['price'] . "', total = '" . (float)$product['total'] . "', tax = '" . (float)$product['tax'] . "', quantity = '" . (int)$product['quantity'] . "', subtract = '" . (int)$product['subtract'] . "'");

Newbie

Posts

Joined
Sat Jun 12, 2010 10:48 am

Post by Qphoria » Tue Jun 22, 2010 7:27 pm

Did you get the 1.4.8b version/patch? that was fixed in 1.4.8b

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by eka7a » Tue Jun 22, 2010 11:44 pm

eka7a wrote:Price Low -> High and Price High -> Low

Sorting on pages is not working
Example: http://demo.opencart.com/index.php?rout ... ry&path=24

AND

http://www.site.com/index.php?route=che ... s/shipping

This error occurs when the checkout address is left blank.

Code: Select all

Notice: Undefined index: firstname in C:\wamp\www\opencart-tr_v148b_tam_surum\catalog\controller\checkout\address.php on line 307Notice: Undefined index: lastname in C:\wamp\www\opencart-tr_v148b_tam_surum\catalog\controller\checkout\address.php on line 311Notice: Undefined index: address_1 in C:\wamp\www\opencart-tr_v148b_tam_surum\catalog\controller\checkout\address.php on line 315Notice: Undefined index: city in C:\wamp\www\opencart-tr_v148b_tam_surum\catalog\controller\checkout\address.php on line 319Notice: Undefined index: country_id in C:\wamp\www\opencart-tr_v148b_tam_surum\catalog\controller\checkout\address.php on line 323Notice: Undefined index: zone_id in C:\wamp\www\opencart-tr_v148b_tam_surum\catalog\controller\checkout\address.php on line 327

SSL Certificates


User avatar
Active Member

Posts

Joined
Sun Apr 12, 2009 12:59 am
Location - Türkiye

Post by zsunsun » Wed Jun 23, 2010 12:58 am

Qphoria wrote:Did you get the 1.4.8b version/patch? that was fixed in 1.4.8b
Sorry, forgot to include I did install patch..

I'll go back and reapply patch and see if that fixes it

Update:

Reapplying patch fixed that bug :-[

somehow that bug survived my brutal update procedure! ???

Thanks for quick reply!

Newbie

Posts

Joined
Sat Jun 12, 2010 10:48 am

Post by icareless » Wed Jun 23, 2010 12:58 pm

Add comment and click "save" order in edit order / admin page. Detail of product option gone.
Is it a bug?

Newbie

Posts

Joined
Thu Jan 14, 2010 4:00 pm

Post by i2Paq » Wed Jun 23, 2010 2:43 pm

icareless wrote:Add comment and click "save" order in edit order / admin page. Detail of product option gone.
Is it a bug?
No, have a closer look at that page ;)

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by s79colin » Wed Jun 23, 2010 5:39 pm

I have just upgraded to 1.4.8 and I notice that the value sorts High-Low and Low - High don't work in the category views.

The default, A-Z & Z-A sorts work fine.

Any fix?

Newbie

Posts

Joined
Sun May 09, 2010 5:21 pm

Post by Daniel » Wed Jun 23, 2010 6:15 pm

eka7a wrote:Price Low -> High and Price High -> Low

Sorting on pages is not working


The demo is not 1.4.8.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Qphoria » Wed Jun 23, 2010 10:07 pm

Yes it is.. I updated the demo at opencart.com with 1.4.8 last week
But it doesn't have the sorting by price fix yet.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by momtrepreneur » Sat Jun 26, 2010 9:34 am

Wondering if someone could help me figure out what's wrong. I upgraded from 1.4.6 to 1.4.8. Installation was fine, no errors, beta upgrade script appeared to work. However when I add an item to the cart, the item will add but no matter where I click next, I get a blank screen and am unable to access any other areas of the store. Just a persistent blank screen. Admin is working as far as I can tell. I should mention that I also installed Global mega Options 1.4.8 module as well. I'm not sure which is causing the problem. ??? Here's the last error from the Error Log within admin:

2010-06-25 18:14:46 - PHP Notice: Undefined variable: subtotal in /home/xxxxxxxxxxxxxxxxxxxx/shop/catalog/view/theme/csc_standard/template/module/cart.tpl on line 19.

I know my way around a little so I could probably fix it if pointed in the right direction. Anybody? ???

Opencart 1.4.9.1
Global Options Mod


New member

Posts

Joined
Wed Apr 21, 2010 2:27 am

Post by Xsecrets » Sat Jun 26, 2010 10:56 am

your theme is not updated to work with 1.4.8

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by momtrepreneur » Sat Jun 26, 2010 11:12 am

Wow....how silly of me! :-[ And I was just about to do a completely fresh install. Whew, glad I don't have to do that. Thanks!

Opencart 1.4.9.1
Global Options Mod


New member

Posts

Joined
Wed Apr 21, 2010 2:27 am

Post by JAY6390 » Sat Jun 26, 2010 9:27 pm

This subtotal bug seems to be coming up a lot. Perhaps a sticky in the template/bug forums would be a good idea?

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by i2Paq » Sat Jun 26, 2010 10:40 pm

JAY6390 wrote:This subtotal bug seems to be coming up a lot. Perhaps a sticky in the template/bug forums would be a good idea?
Write it and I make it sticky :)

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by JAY6390 » Sat Jun 26, 2010 11:43 pm

There's only one thing you should do really in this case, and that's replace your current cart.tpl file with a fresh copy from the 1.4.8b template, and then style that accordingly. As for the fix for subtotal, you could replace this line on line 19

Code: Select all

<div style="text-align: right;"><?php echo $text_subtotal; ?>&nbsp;<?php echo $subtotal; ?></div>
with

Code: Select all

    <table cellpadding="0" cellspacing="0" align="right" style="display:inline-block;">
      <?php foreach ($totals as $total) { ?>
      <tr>
        <td align="right"><span class="cart_module_total"><b><?php echo $total['title']; ?></b></span></td>
        <td align="right"><span class="cart_module_total"><?php echo $total['text']; ?></span></td>
      </tr>
      <?php } ?>
    </table>
    <div style="padding-top:5px;text-align:center;clear:both;"><a href="<?php echo $view; ?>"><?php echo $text_view; ?></a> | <a href="<?php echo $checkout; ?>"><?php echo $text_checkout; ?></a></div>
There are other changes that have been made to the cart (particularly the AJAX/JS) which is why I would suggest just replacing the old cart file with the new one and then re-styling as needed. The add to cart js has been moved to a separate js file and included in the code

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by Johnathan » Sun Jun 27, 2010 12:22 am

Are the ".help" and ".tooltip" classes in the catalog stylesheet used at all? I couldn't find any references to them in the template files. If they're not being used, they should probably be removed.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by poshook » Sun Jun 27, 2010 3:23 am

OSWorX wrote:
i2Paq wrote:
akarikuu wrote:Hello,

Sort by price seems not to work (in my shop 1.4.8b and also in demo.opencart.com)
It seems not even order by price considering it a string instead of a number?!

I found this topic: http://forum.opencart.com/viewtopic.php?f=31&t=13002 but i did not help me.

Is this a Bug?
I agreed, does not work on my store either.
In ../catalog/model/catalog/product.php:

FIND ALL SECTIONS LIKE THIS:

Code: Select all

$sort_data = array(
			'pd.name',
			'p.sort_order',
			'special',
			'rating'
		);

Change them to be:

Code: Select all

$sort_data = array(
			'pd.name',
			'p.sort_order',
			'special',
			'rating',
			'p.price'
		);
Now sorting after price works.

Should be about 5-6 places
this does not work for me. after update product.php I got empty white website. check my product.php in attachment and my http://www.musiclandia.sk with result

Attachments

my product.php, please just rename zip to php, do not extract

Last edited by poshook on Sun Jun 27, 2010 3:34 am, edited 1 time in total.

https://www.youtube.com/@Then_


Active Member

Posts

Joined
Sun Jun 27, 2010 3:19 am

Post by Qphoria » Sun Jun 27, 2010 3:32 am

The subtotal thing does come up a lot but I've stickied and announced to people over and over how to make templates. The steps are in the documentation area and people don't listen.

1. DO NOT COPY ALL FILES TO MAKE A NEW TEMPLATE. USE THE TEMPLATE OVERRIDE.

IF THE TEMPLATE DOES NOT PROPERLY USE THE OVERRIDE SYSTEM, THEN TELL YOUR TEMPLATE MAKER TO TAKE A HIKE

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by poshook » Sun Jun 27, 2010 3:55 am

I bought template compatible with 1.4.8b (including price sort bug) and it works well with no problem with 1.4.8b.(this is what I expected).
After fixing this price bug the compatibility is missing because I have changed official 1.4.8b for something else.
I do not know what you are talking about because I am total beginner here but what I know is that I have one template and one opencart installation working together only with opencart's bug :)

https://www.youtube.com/@Then_


Active Member

Posts

Joined
Sun Jun 27, 2010 3:19 am

Post by muflon » Mon Jun 28, 2010 10:39 pm

I hope that this is a bug not feature -

I set Invoice Prefix to "2010106" and Invoice Start No to 001 and I expected to have invoice numbers 2010106001, 2010106002, 2010106003.... but I get 20101061, 20101062, 20101063 - there are not zeroes I think this is not right

New member

Posts

Joined
Mon Aug 24, 2009 2:43 pm
Who is online

Users browsing this forum: No registered users and 39 guests