Jump to content


Corporate Sponsors


Latest News: (loading..)

FOD

Member Since 06 Oct 2005
Offline Last Active Feb 05 2012, 21:57
-----

Posts I've Made

In Topic: [Contribution] QTpro - Quantity Tracking Professional

19 August 2011, 21:02

View PostDavefromcornwall, on 18 April 2011, 17:20, said:

Apologies for talking to myself here! But I've sort of stumbled across a solution to having "Please Select" at the top of the drop-down list, so I thought I'd share it, in case it benefits someone else.
The fix from earlier in the thread works, if you also choose the correct options in the QT Pro section of the admin.
So, with belated thanks to mbi15, whose "hack" this is:
Open /includes/functions/html_output.php
Find
for ($i=0, $n=sizeof($values); $i<$n; $i++) {

Immediately before that line add:
	$field .= '<option value="select"';
	$field .= '>Please select ...</option>';

My options in Admin/Configuration/Prod Info (QTPro)
are:


On a product with choice of colour (with no price variation) and choice of size (with price variation) two drop down lists, the top one's default is "First Select Colour" and the default of the second drop down is "Please Select". Out of stock items are not displayed. If a customer tries to add a product to the cart without changing the default drop-down list option, a pop-up prevents them from doing so. I have the "add-weight-to-product-attributes" add-on installed and the weight and price differential gets passed into the shopping cart. So I'm happy enough with that, so far.

Now all I need is the whole lot aligned to the right, just above the Add To Cart button, and I'll be a happy camper, until the next time, anyway.

Tried the hack as suggested.

Works great with only one attribute; however if as I do you have two attributes: One for size (trackable) and one for 'Add Giftwrap' (yes or no and not trackable - i.e. track stock option off on this attribute) it doesn't seem to work properly really. The Please Select option appears on the top of the dropdowns as expected but if a customer selects a size but not the gift wrap option (either yes or no) and clicks add to cart the product does not get added to the shopping cart. Anyone know of a way to have the alert or pop up window appear if both sets of options are not selected?