bobbingwide / vgc

VGC - Garden Vista Group theme
GNU General Public License v2.0
0 stars 0 forks source link

Installation options #40

Closed bobbingwide closed 2 years ago

bobbingwide commented 2 years ago

For some products installation is free. For others it's Price On Enquiry (POE). What are the alternative methods for defining and displaying installation costs?

When a Deponti product is displayed the user sees two Installation sections. The first is for the optional upgrade. image The second, which appears after the building removal section, indicates that installation is FREE, when the Installation Cost is 0, image or you have a choice when it's not zero. Here I've set it to 100. image

bobbingwide commented 2 years ago

Requirements

Proposed solution

<?php if ( 'Installation' === $addon['title_of_area']) { $installationStatus = false; } ?>
bobbingwide commented 2 years ago

Note: I'm not sure what's meant by overrides global install cost.

This was confirmed by checking the Installation costs for products in the Passmores brand.

So, there are two options remaining:

  1. Use the Installation cost in the meta box
  2. Use the optional upgrades method for POE
bobbingwide commented 2 years ago

Requirements from an email on 28th June.

Regards to Deponti and Lugarde, global base work and installations should be removed as I have entered those Manually.

Although when entered manually, figure of "0" needs to be removed. On the description price on application written.

Proposed solution

There are other options where the price is 0.

eg For https://gvg.co.uk/store/deponti-bosco-veranda-4060x3000mm/#options_area the zero cost options are:

bobbingwide commented 2 years ago

Delivered in v1.3.0

bobbingwide commented 2 years ago

On Friday, Yasmin called regarding having the ability to set Price on Application ( aka Price on Enquiry ) against the product without having to create an optional upgrade.

In the live site, the ACF Options value for Installation (free) had been set to Price on Application. When viewed on the front end this appears as image

It's not possible to deselect the check box.

See https://gardenvista.co.uk/store/alton-broadwell-10-x-10-ft-summerhouse/#options_area

The previous version of the text was FREE UK INSTALLATION.

The number of products with a particular value for installation_cost are:

Qty Installation cost
338 blank
119 0
41 420.00
21 350.00
etc various

Notes:

bobbingwide commented 2 years ago

The logic that deals with the installation_cost post meta field is in template-parts/shop/addons/installation-addon.php

When the $installCost is 0 the FREE display is as in https://github.com/bobbingwide/vgc/issues/40#issuecomment-1188804603 else it displays the No installation and Installation radio buttons.

If required the logic could be extended to support Price on Application / Enquiry. This could be done by another checkbox in the Installation cost and Options discount metabox or by setting the value to -1 ( for example ), which would trigger new logic to enable the user apply for a quote.