Author Topic: MOD: Child list instead of drop down. UPDATE(1.0.11) + store wide quantity mod  (Read 456076 times)

Justin Z

  • Beginner
  • *
  • Posts: 37
Re: MOD: Child list instead of drop down. UPDATE (
« Reply #330 on: December 15, 2006, 18:30:24 pm »

Having checked the DB table and the frontend output, it is displayed and stored correctly. It is only incorrect when editing a created product. I assume this is because the escaped format of the string is not working with the form.

I have tested this and altered product.product_form and changed line 703 from

Code: [Select]
<text class="inputbox"  name="<?php echo $field_name?>" size="32" maxlength="255" value="<?php $db_attribute->sp("attribute_value"); ?>" />

to this

Code: [Select]
<textarea  class="inputbox"  name="<?php echo $field_name?>" rows="1" cols="32" maxlength="255" ><?php $db_attribute->sp("attribute_value"); ?></textarea >

Changing this to a text area seems to have done the trick. It will now display exactly as it should when editing the record.

Hope this helps

Mark



I'd like to make this change too, but I'm a bit confused... (no surprise there!)

I assume you mean com_virtuemart/html/product.product_form.php (?).  My line 703 reads:

Code: [Select]
<input type="text" class="inputbox"  name="<?php echo $field_name?>" size="32" maxlength="255" value="<?php $db_attribute->sp("attribute_value"); ?>" />
I'm not sure how to form the beginning of the line. What am I missing?

excogitation

  • Beginner
  • *
  • Posts: 28
Re: MOD: Child list instead of drop down. UPDATE (
« Reply #331 on: December 15, 2006, 18:49:21 pm »
Since you're all using this mod, can one please confirm what I'm experiencing here:

parent item has availability 0, but there are still child items for sale, but they don't show because
of parent availability 0.

Another thing, if you have check stock quantity set and don't display 0 items, this
mod does still show those 0 items.

Thanks

thomas_freeman

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 450
    • Kustom Services
Re: MOD: Child list instead of drop down. UPDATE (
« Reply #332 on: December 15, 2006, 18:58:26 pm »
I'd like to make this change too, but I'm a bit confused... (no surprise there!)

I assume you mean com_virtuemart/html/product.product_form.php (?).  My line 703 reads:

Code: [Select]
<input type="text" class="inputbox"  name="<?php echo $field_name?>" size="32" maxlength="255" value="<?php $db_attribute->sp("attribute_value"); ?>" />
I'm not sure how to form the beginning of the line. What am I missing?


I actually replaced the whole line like you have it, JustinZ, with the new code that Mark had.  I believe his first line may be from VM1.0.8 or another modification he had in the file.  It didn't match mine either, but the change worked.  Make sure you change the existing </input> to </textarea>

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
Re: MOD: Child list instead of drop down. UPDATE (1.0.7) + store wide quantity m
« Reply #333 on: December 15, 2006, 19:03:59 pm »
Justin_z

that is the correct line, I just didn't type in the correct begining of the line!

replace the whole line with the line that I specified i.e. the second line of code. That'll put in a text area for the output in the backend and display correctly.

excogitation

unfortunately thats the way vm works, if check stock levels is turned on and a product parent has a level of 0 the children won't be displayed. Set your parent product with a high stock level, this will ensure it is displayed.

Mark
Mark
All of My old mods are now available on my website.
Mark Callf Designs

If you like the work I've done for VM please fell free to Donate

Please Note: I am no longer actively developing or involved with VM development.

excogitation

  • Beginner
  • *
  • Posts: 28
Re: MOD: Child list instead of drop down. UPDATE (1.0.7) + store wide quantity m
« Reply #334 on: December 15, 2006, 19:24:18 pm »
@mccalff: what about the child products being 0? Should they also be displayed?

can you hint me towards the file that generates the child products (shouldn't be to hard
adding some function checking availability)
do you think it's hard to extend the availabilitycheck to also check for child products?

Thanks.

excogitation

  • Beginner
  • *
  • Posts: 28
Re: MOD: Child list instead of drop down. UPDATE (1.0.7) + store wide quantity m
« Reply #335 on: December 16, 2006, 10:48:55 am »
So if you use check in stock and Override Child products Display Values and use parents and
Use List box for child products and Add to Cart Button for each Child

and don't want your not available childs NOT TO BE SHOWN ;)
ps_product_attribute.php add  AND product_in_stock>0 to your sql statement in line 430.

 ;)

johnnybravo

  • Jr. Member
  • **
  • Posts: 66
I read this thread a week or so ago and cant remember seeing the answer, so please forgive me for not reading it all again if the question is already answered!!

I have installed the mod and working great for items with children, but if i dont add children in, the product displays like this:




Is it possible to fix this? if so where?

Also, one other question, is how are the child products ordered? I have added in a load of sizes for one product (S, M, L, XL, XXL, XXXL) and on one product the order is right but on the other the XXXL comes before the XXL????

thanks again for a great mod!!

John

johnnybravo

  • Jr. Member
  • **
  • Posts: 66
oh also, i forgot.... what is the piece bit???

johnnybravo

  • Jr. Member
  • **
  • Posts: 66
can anyone help me on this?

adel

  • Beginner
  • *
  • Posts: 1
Re: MOD: Child list instead of drop down. UPDATE (
« Reply #339 on: December 22, 2006, 18:59:20 pm »
hey ,

i ve installed the child mod 1.0.7 , i ve try to read the 23 pages , but i dont find what i want to do exactly. i just want to know how is possible to create a parents product and the child, like for example a tee shirt, and in child  the tee shirt size . thanks alot



thomas_freeman

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 450
    • Kustom Services
Re: MOD: Child list instead of drop down. UPDATE (1.0.7) + store wide quantity m
« Reply #340 on: December 22, 2006, 21:46:36 pm »
Adel,
Check the following post out:

http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=22241.msg59994#msg59994

Hopefully that will help.

Lily

  • Beginner
  • *
  • Posts: 17
Re: MOD: Child list - strike through
« Reply #341 on: December 25, 2006, 12:38:27 pm »
Hi Mark,
I join every user of your mod and express my gratitude for the nice feature and work!

I want to point out a typo when eliminating the strike through the original price. There is a </strike> missing at the end of                       
 $html .= $CURRENCY_DISPLAY->getFullValue($price["product_price"])."</span>&nbsp;";

It should read
 $html .= CURRENCY_DISPLAY->getFullValue($price["product_price"])."</strike></span>&nbsp;";

Merry Christmas.

Hi,

sorry about that, I forgot to update to handle that!!

in ps_product_attributes.php

search for this code it appears twice in the file :

                    $html .= "<td width=\"10%\"align='right'>";
                    $html .= "<span style=\"color:red;\">\n<strike>";
                    $html .= $CURRENCY_DISPLAY->getFullValue($price["product_price"])."</strike></span>&nbsp;";
                    $html .= $CURRENCY_DISPLAY->getFullValue($actual_price["product_price"]);
                    $html .= "</td>";
 
replace with this

$html .= "<td width=\"10%\"align='right'>";
                    if($price['product_price'] != $actual_price['product_price']) {
                        $html .= "<span style=\"color:red;\">\n<strike>";
                        $html .= $CURRENCY_DISPLAY->getFullValue($price["product_price"])."</span>&nbsp;";
                        $html .= $CURRENCY_DISPLAY->getFullValue($actual_price["product_price"])."&nbsp;";
                    }
                    else {
                        $html .= $CURRENCY_DISPLAY->getFullValue($price["product_price"])."&nbsp;";
                    }
                    $html .= "</td>";

This now checks to see if the discounted price = actual price if it does it displays only the price, if there is a discount it will display as you see it now

Mark

MyMusicVid

  • Beginner
  • *
  • Posts: 41
    • Music videos site
Hi

I have a problem using this with VM 1.0.8, i think the way the referring page is captured and used is different in 1.0.8, so after updating the shopping cart, i'm being referred to www.mysite.com/index.php and the default shop.flypage. Also, the Continue Shopping button is missing from the cart page, again i think it is to do with the referrer code. Otherwise, it seems to work as well as in 1.0.7.

One other thing I have noticed, is that the quantity boxes on the product details page show the number of products already added to the shopping cart, but if you increase that number and update the cart, you get the initial number already in the cart added to the number you entered into the quantity box - it adds, rather than updates.


thomas_freeman

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 450
    • Kustom Services
Hi Mark,

I just downloaded and installed 1.0.8.  I thought I remembered you saying that you were working on getting this mod into 1.0.8.  I didn't see it when I went to a parent product.  Did it not make it in?

Thanks for your help!

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
Thomas,

this mod will be integral to VM 1.1 not the 1.0.x branch.

Ensonix,

I will be updating the mod but when 1.0.9 comes out. 1.0.8 has a few bugs and a new version is due for release on Monday 8th Januray

Mark
Mark
All of My old mods are now available on my website.
Mark Callf Designs

If you like the work I've done for VM please fell free to Donate

Please Note: I am no longer actively developing or involved with VM development.