Ordered Products not showing in Order Information

  • Posts: 33
  • Thank you received: 0
11 years 11 months ago #81296

I am running through my testing of my site. I can select items and add to the cart. I can also checkout and make payment and confirm the payment process works, but I get the following issues.

1. Order Creation Email looks fine and gets sent to customer. Ordered Products are displayed.
2. Order Status Change emails get sent, but there is no Product information displayed, like unit, description or unit price.
3. Order Confirmation email is sent to customer and again no Unit Price, Unit Description or Quantity displayed, nor Tax information even though it is setup.

On the Back-end, when I review orders:

1. No products under the Product List nor in the Invoice or Shipping Invoice.

On the Front-end, when a customer reviews orders there is not Product information under the Product list.

The only time the product information is displayed is during the Shopping Cart, Checkout and Order Creation Email.

What settings should I check?

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 11 months ago #81515

Hi,

If the problem is link to the email content, you can check your email in "System > Email".
In order to test email content without having to send them, you can change the status of an order.
The popup would have an choice : "notify customer".
By selecting "yes", the email content would be display just below. At this moment, you would see what HikaShop would send if you validate the order modification.
The same email is send automatically when an order is confirmed by the payment system.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
11 years 11 months ago #81715

If you activate the debug mode of the joomla configuration, you can see that error when you place an order:

JDatabaseMySQLi::query: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'insert) VALUES (18,1680,1,'40/40 DVD HardBody Black Wave PRO Case: d2 Fixed Page','40_40_DVD_HardBody_Black_Wave_PRO_Case_d2','50.1415','5.01415','a:2:{i:1;O:8:\"stdClass\":8:{s:25:\"variant_characteristic_id\";s:2:\"40\";s:18:\"variant_product_id\";s:4:\"1680\";s:8:\"ordering\";s:1:\"0\";s:17:\"characteristic_id\";s:2:\"40\";s:24:\"characteristic_parent_id\";s:2:\"42\";s:20:\"characteristic_value\";s:13:\"d2 Fixed Page\";s:20:\"characteristic_alias\";s:0:\"\";s:23:\"characteristic_ordering\";s:1:\"0\";}s:10:\"Page Style\";s:13:\"d2 Fixed Page\";}',43,'a:1:{i:0;O:8:\"stdClass\":11:{s:11:\"taxation_id\";s:1:\"2\";s:12:\"zone_namekey\";s:20:\"country_Australia_13\";s:16:\"category_namekey\";s:11:\"default_tax\";s:11:\"tax_namekey\";s:3:\"GST\";s:18:\"taxation_published\";s:1:\"1\";s:13:\"taxation_type\";s:0:\"\";s:15:\"taxation_access\";s:3:\"all\";s:19:\"taxation_cumulative\";s:1:\"0\";s:8:\"tax_rate\";s:7:\"0.10000\";s:9:\"zone_type\";s:7:\"country\";s:10:\"tax_amount\";d:5.014150000000000773070496506989002227783203125;}}',0,'','')
This means that there is a problem with the table hikashop_order_product where the products of an order are stored. Which explains why you don't get the information of the products in the orders. The MySQL error unfortunately doesn't say where the error is.
I see that you only have test orders for now so I would recommend to delete the tables order and order_product via phpmyadmin and add them back manually by importing the back/tables.sql file of your HikaShop install package via phpmyadmin (you will need to change the table prefix in the file before doing so from #__ to your table prefix).

Please Log in or Create an account to join the conversation.

  • Posts: 33
  • Thank you received: 0
11 years 11 months ago #81789

Nicolas,

No good, I have even updated to version 2.0. Looking at the insert statement and the table, I think there is a missing "," for the first field that is Auto Incremented.

can you please check the SQL statement generated.

Thanks,
Richard

Please Log in or Create an account to join the conversation.

  • Posts: 33
  • Thank you received: 0
11 years 11 months ago #81801

Could it be my version of MySQL, current running 5.0.96, latest the ISP provider is supplying.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
11 years 11 months ago #81986

The version of MYSQL is fine and the SQL query is of course correct (otherwise, no one would be able to use HikaShop...).
Can you please check that you have the order_product table in your database with the correct prefix ?
If not add it manually.
Here is the query from the tables.sql file:

CREATE TABLE IF NOT EXISTS `#__hikashop_order_product` (
	`order_product_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
	`order_id` int(10) unsigned NOT NULL DEFAULT '0',
	`product_id` int(10) unsigned NOT NULL DEFAULT '0',
	`order_product_quantity` int(10) unsigned NOT NULL DEFAULT '1',
	`order_product_name` varchar(255) NOT NULL DEFAULT '',
	`order_product_code` varchar(255) NOT NULL DEFAULT '',
	`order_product_price` decimal(17,5) NOT NULL DEFAULT '0.00000',
	`order_product_tax` decimal(17,5) NOT NULL DEFAULT '0.00000',
	`order_product_options` text NOT NULL,
	`order_product_option_parent_id` int(10) unsigned DEFAULT '0',
	`order_product_tax_info` text NOT NULL,
	`order_product_wishlist_id` int(11) NOT NULL DEFAULT '0',
	PRIMARY KEY (`order_product_id`),
	KEY `order_id` (`order_id`)
) ENGINE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci*/;

Please Log in or Create an account to join the conversation.

  • Posts: 33
  • Thank you received: 0
11 years 11 months ago #82234

Mine looks identical.

CREATE TABLE IF NOT EXISTS `j25_hikashop_order_product` (
`order_product_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`order_id` int(10) unsigned NOT NULL DEFAULT '0',
`product_id` int(10) unsigned NOT NULL DEFAULT '0',
`order_product_quantity` int(10) unsigned NOT NULL DEFAULT '1',
`order_product_name` varchar(255) NOT NULL DEFAULT '',
`order_product_code` varchar(255) NOT NULL DEFAULT '',
`order_product_price` decimal(17,5) NOT NULL DEFAULT '0.00000',
`order_product_tax` decimal(17,5) NOT NULL DEFAULT '0.00000',
`order_product_options` text NOT NULL,
`order_product_option_parent_id` int(10) unsigned DEFAULT '0',
`order_product_tax_info` text NOT NULL,
`order_product_wishlist_id` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`order_product_id`),
KEY `order_id` (`order_id`)
) ENGINE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci*/;

Could if be the version of MySQL? What version are you running?

Please Log in or Create an account to join the conversation.

  • Posts: 33
  • Thank you received: 0
11 years 11 months ago #82328

Is there away to capture the SQL statement generated in your version to compare against the one throwing and error in mine. My hosting company is not able to upgrade the MySQL version as it is a shared system. But if I can modify the code to the correct the SQL statement.

Regards,
Richard

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
11 years 11 months ago #82503

I don't think that it comes from the version of MySQL.
If you activate the debug mode of the joomla configuration, you can see that error when you place an order.

The SQL statement should be this one:

$query='INSERT IGNORE INTO '.hikashop_table('order_product').' ('.implode(',',$fields).') VALUES '.implode(',',$items);
			$this->database->setQuery($query);
			$this->database->query();
in the file administrator/components/com_hikashop/classes/order_product.php

if you add a
var_dump($query);
after that code, you should see the SQL statement on your website when the order is created.

Please Log in or Create an account to join the conversation.

  • Posts: 33
  • Thank you received: 0
11 years 11 months ago #82515

Below is the SQL generated, I don't see an issue accept for the table name. I would have thought it would have resolved this to the correct name.

string(888) "INSERT IGNORE INTO #__hikashop_order_product (order_id,product_id,order_product_quantity,order_product_name,order_product_code,order_product_price,order_product_tax,order_product_options,order_product_option_parent_id,order_product_tax_info,order_product_wishlist_id,lining,insert) VALUES (3,1676,1,'d2i DVD Storage Box Divider Set','d2i_DVD_Storage_Box_Divider_Set','15.2915','1.52915','',47,'a:1:{i:0;O:8:\"stdClass\":11:{s:11:\"taxation_id\";s:1:\"2\";s:12:\"zone_namekey\";s:20:\"country_Australia_13\";s:16:\"category_namekey\";s:11:\"default_tax\";s:11:\"tax_namekey\";s:3:\"GST\";s:18:\"taxation_published\";s:1:\"1\";s:13:\"taxation_type\";s:0:\"\";s:15:\"taxation_access\";s:3:\"all\";s:19:\"taxation_cumulative\";s:1:\"0\";s:8:\"tax_rate\";s:7:\"0.10000\";s:9:\"zone_type\";s:7:\"country\";s:10:\"tax_amount\";d:1.529150000000000009237055564881302416324615478515625;}}',0,'','')"

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
11 years 11 months ago #82724

Ah ! Error spotted !
You created a custom field of the table "item" with the column name "insert". That is a key word for MySQL. You cannot use it in queries. Delete that custom field and create another one with another column name and you won't have the error anymore.

Please Log in or Create an account to join the conversation.

  • Posts: 33
  • Thank you received: 0
11 years 11 months ago #82846

Nicolas,

Was close but not the issue. If I create a custom field and select the table to be 'Item' from the pull-down list and add to a product category, then the query fails no matter the name. I have checked in phpMyAdmin and there is no j25_hikashop_item table. There are the other tables:

Address
User
Product
Order
Category
Entry

I then checked the tables.sql from the HikaShop_Business_2.0.0 release and all tables are defined but Item. I believe here is the bug.

Can you confirm if there is supposed to be a Item table.

Regards,
Richard

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 11 months ago #82970

Hi,

You have deleted the custom field with the name "insert" and it still doesn't work ?
It's normal to not have a table "item", it's just to add the information of which database to insert the custom field. In that case the table "#__hikashop_order_product"

The following user(s) said Thank You: Jerome

Please Log in or Create an account to join the conversation.

  • Posts: 33
  • Thank you received: 0
11 years 11 months ago #83062

:laugh: :woohoo:

Thank you for that bit of information. With that I was able to determine what the columns needed to be so manually created them in the order_product table and all works now.

Richard

Please Log in or Create an account to join the conversation.

Time to create page: 0.100 seconds
Powered by Kunena Forum