made a huge amount of changes to get it to work the way we needed to.
most things look the same, so should be easy enough to convert (i hope)
the only major change i'm struggling with is the checkout
one of the key things is adding another box to the checkout_shipping to record the delivery date on selected products.
which works it out based on the products weight.
e.g. if the product weight is 1 then show a box showing a calendar
if its products weight is 2 then just show text saying delivery will be in x days
this is what i used to find what product has the height weight
Code: Select all
$products = $cart->get_products(); // get the basket contents
for ($i=0, $n=sizeof($products); $i<$n; $i++) { //loop through the basket contents
$test .= $products[$i]['weight']; // get the 'weight' of the product - radio buttons in admin save the days option as the weight so it can be used here
} // end loop
$arr2 = str_split($test,4); // spilt the resulting info so it can be used below
$blah = max($arr2); // find the highest value so we can use it below
but getting a error
Fatal error: Uncaught Error: Cannot use object of type Product as array
the line in question is
Code: Select all
$test .= $products[$i]['weight'];