News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Order creation date is set to 00:00:00 after succesfull order (3.8.9.10622)

Started by Roderic, April 13, 2022, 22:32:31 PM

Previous topic - Next topic

Roderic

Good evening,

I've installed version 3.8.9.10622 on a J3.10 test site and after all seemed to work well, I also installed it on a live site.
There I noticed the following problem:

1. An order is placed and there is a proper value in created_on in xxx_virtuemart_orders.
2. Customer pays the order with for example PayPal (VM Paypal plugin)
3. After the successful payment the client returns to the site and the date in created_on is now 00:00:00

This does not happen with Pay.nl plugin and VM PayPal plugin. I've also tested this with "VM Payment - Standard" and there it works fine.

Edit:

In xxx_virtuemart_order_histories -> created_on looks fine. Except I see there that there are no messages from the payment plugin

GJC Web Design

Hi Roderic,

unless your using this for testing I wouldn't yet use this on a production site .. Max will release VM4 shortly and this should be production ready on J3, used with caution on J4

they are already up to 10631 with constant fixes .. think creation date has been fixed from memory
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Roderic

Hi John,

I was still running 3.8.9 10473 and have checked and tested newer versions occasionally on test sites.  Since all seemed to work well, I decided to update in the hope it would fix some other issues. Also hoping the new admin template would be workable but it isn't yet.

One of the problems I'm having, is that the availability in sublayouts/snippets.php is not correct for products without child products and the Stock handle is set to "Do not Display Product, if children are also out of stock."

For example this product: https://www.woest-sport.nl/en/electronics/bike-computers/garmin-edge-830-detail

It says OutOfStock in the Rich Snippet although there is still 24 available. This product has no children.

A product with children however, works as expected:

https://www.woest-sport.nl/en/shoes/running/competition/hoka-mach-4-men-running-shoes-1-detail



I also send you an e-mail with a few questions about 3 weeks ago, unfortunately no reply.

Cheers

Roderic


Milbo

Quote from: Roderic on April 14, 2022, 14:56:10 PM
is that the availability in sublayouts/snippets.php is not correct for products without child products and the Stock handle is set to "Do not Display Product, if children are also out of stock."

For example this product: https://www.woest-sport.nl/en/electronics/bike-computers/garmin-edge-830-detail

It says OutOfStock in the Rich Snippet although there is still 24 available. This product has no children.

A product with children however, works as expected:

https://www.woest-sport.nl/en/shoes/running/competition/hoka-mach-4-men-running-shoes-1-detail

Do you have still this problem? I think you can just use the last vmtable file. should be compatible to the rest.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Roderic

Quote from: Milbo on April 17, 2022, 20:19:42 PM
Do you have still this problem? I think you can just use the last vmtable file. should be compatible to the rest.

This problem has been there all the time, not since updating. It is also not fixed by using the latest vmtables. However, I changed the snippets.php file in a few places.
Also, the code in the snippet only looks at product_in_stock and doesn't take product_ordered into account. Also changed that.

Here is what I came up with:

//GJC look for parent & for child stock
//$stockog = 'InStock';
$stockhandle = VmConfig::get ('stockhandle', 'none');
$finalstk = $product->product_in_stock - $product->product_ordered;
if ($stockhandle == 'none') {
$stockog = 'InStock';
} elseif ($stockhandle == 'disableit_children' and $product->product_parent_id == 0) {
$prodmodel = VmModel::getModel ('product');
$children = $prodmodel->getProductChilds($product->virtuemart_product_id);
$finalstk = $product->product_in_stock - $product->product_ordered;
foreach($children as $child){
$finalstk += $child->product_in_stock - $child->product_ordered;
}
} else {
$finalstk = $product->product_in_stock - $product->product_ordered;
}
if ($finalstk != 0) {
$stockog = 'InStock';
}
if ($finalstk == 0) {
$stockog = 'OutOfStock';
}

pinochico

Perfect, thanks

I add to our plugin for rich snippets for VM and Phoca cart too.
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products