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

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
kaputtendorf_fred

Sorry another one that I missed, have attached an updated ps_product_attribute.php

just extract and overwrite

Mark

[attachment cleanup by admin]
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.

baisan

  • Beginner
  • *
  • Posts: 11
hi there im having this quantity problem in IE and Firefox
when i add a quantity lets say 123456 (6) digit and it will
compute with the product price it is correct,
example:

Quantity | price
123456 x $5 = 617280

In IE the Quatity "123456" is show in the quantity field when you click the Add to cart button. But in Firefox instead 123456
it only show 1234 in Quantity field but the computation is correct. It confuses the customer/buyer.

Is this validation issue? quantity field issue?
crossbrowser issue?

Please HELP!

baisan

  • Beginner
  • *
  • Posts: 11
is there a way can i validate the quantity maximum of 6 or 10 digits only? because as i can see i can add qautity up to ulimited
number of digits.

Please help

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
The quantity field in VM is set up to display 4 digits. FF obeys these rules IE doesn't. You would hav to alter the form fields for quantity and change it's size in show_quantity_box in ps_product_attribute. it should be at line 978
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.

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
is there a way can i validate the quantity maximum of 6 or 10 digits only? because as i can see i can add qautity up to ulimited
number of digits.

Please help

Yes you can, but I'm not going to. Reason, not everybody wants it or needs it. If the quantity is greater than you have in stock, then they don't get ordered. If you have the stock and somebody wants to but unlimited amounts - let them!!

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.

mark R

  • Jr. Member
  • **
  • Posts: 220
Re: MOD: Child list instead of drop down. UPDATE (
« Reply #185 on: October 12, 2006, 16:27:14 pm »
thomas_freeman

in an earlier post I discussed the code that needs to be changed to show the discounted price.

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

This does not display the strikeout full price but it does show the actual price.


the code could be altered to show both but it depends on how you want it displayed.

If you replaced this code in ps_product_attribute.php (about line 542 & 337

// Attributes for this item are done.
// Now get item price
      if( $_SESSION['auth']['show_prices'] && _SHOW_PRICES) {
             $price = $ps_product->get_price($db->f("product_id"));
         if( $_SESSION["auth"]["show_price_including_tax"] == 1 ) {
            $tax_rate = 1 + $ps_product->get_product_taxrate($db->f("product_id"));
            $price['product_price'] *= $tax_rate;
                    }
                    $columns++;
                    $html .= "<td width=\"10%\"align='right'>";
                    $html .= $CURRENCY_DISPLAY->getFullValue($price["product_price"])."</td>";
                }         
with this

// Attributes for this item are done.
            // Now get item price
            if( $_SESSION['auth']['show_prices'] && _SHOW_PRICES) {
               $price = $ps_product->get_price($db->f("product_id"));
                    $actual_price = $ps_product->get_adjusted_attribute_price($db->f("product_id"));
               if( $_SESSION["auth"]["show_price_including_tax"] == 1 ) {
                  $tax_rate = 1 + $ps_product->get_product_taxrate($db->f("product_id"));
                  $price['product_price'] *= $tax_rate;
                        $actual_price['product_price'] *= $tax_rate;
                    }
                    $columns++;
                    $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>";
                }                       

it will display the price as $xx.xx $xx.xx

Hope this helps             

Mark

Thanks for above hack.

1 problem though when i have a product WITHOUT any child products it still show the full price where the child products are displayed on the product details page . any ideas?

thank
Seek and ye shall find.........
4 VM sites and counting

Johnny33

  • Beginner
  • *
  • Posts: 3
Hi
Thanks for a great mod.
If I understand this right, the child product's form gets automatically populated with the vendor and category fields, is it possible to automatically populate other field? In my case, I only need a different SKU and attribute on the child product. So that if I change the price in the parent poduct, the price in the child products would change as well.

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
Hi
Thanks for a great mod.
If I understand this right, the child product's form gets automatically populated with the vendor and category fields, is it possible to automatically populate other field? In my case, I only need a different SKU and attribute on the child product. So that if I change the price in the parent poduct, the price in the child products would change as well.

The're automatically populated from the parent aswell, so are the images description etc. If they don't exist in the child the're taken from the parent.

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.

mark R

  • Jr. Member
  • **
  • Posts: 220
Mark,

Would it be possible to get the available QTY displaying on the child product list?

thanks in advance
mark
Seek and ye shall find.........
4 VM sites and counting

João Costa

  • Beginner
  • *
  • Posts: 1
Hello

Since this is my first post I have to thank everyone work and dedication. Virtuemart is really incredible.

I want to build a clothes store and this child products/attributes hack is really an essential part of it.
The perfect solution for my problem would be this one Davec requested about a month ago:

Mark this is the look I require couldn't add an image in the messages

Dave

I'm no PHP'er, I see however that he (or someone else) already managed to get the job done at this site:
http://www.planett.com.au/index.php?page=shop.product_details&flypage=shop.flypage&product_id=3370&category_id=99&option=com_phpshop&Itemid=1

Can the author please share his work with us?

Thanks

João

Boudewijn

  • Beginner
  • *
  • Posts: 1
First I want to say thanks for this fantastic mod.

Question, is there a up to date dutch language file for this mod?

Thanks
Boudewijn

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
Sorry, I don't speak dutch!! But if someone else has created one please share.

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.

JDA

  • Beginner
  • *
  • Posts: 17
Hello

As this is my first post, I would like to start of by thanking everyone for their contribution, especially macallf! I'm really impressed with your work on this mod!

At the moment I'm using Mark's 1.07 mod for the site I'm developing. I'm using the child list to display the tracks of a music album (parent). The mod works fine, but I would like to add some extra fields (such as tempo, genre, composer etc.) in the child list without having to click on the child item for more information. In this way when you click on an album, you get to see the album image& description on top with a detailed list of all the tracks.

Working with just a flypage I believe I know how to add the new columns in the database, edit the shop.product_details.php and edit the flypage to display the new fields. However, with this mod things seem to be quite a bit more complicated as the child list cannot be customized in the flypage. As my PHP skills are very limited, I'm not quite sure how to go about adding these fields in the child list.

Any help on the matter would greatly be appreciated! Perhaps if I someone could point me in the right direction I can figure out how to go about doing this...

Thanks in advance!!

Jesse

thomas_freeman

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 450
    • Kustom Services
I recently did this using Product_Types.  I modified Mark's Mod to pull the Product_Type fields in and display them as a column.  I really believe there is a much greater need for this than people realize.  Seems like the Product_Types are very little understood or used.  I'm still waiting for help in populating the fields through CSV.

Take a look at:
http://www.WarehouseHandlingEquipment.com

for an example.

I would be glad to share the changes with you but they are dirty at best.

JDA

  • Beginner
  • *
  • Posts: 17
Thanks for your reply Thomas.

I took a look at your site and it looks good!

Perhaps using product types is the way to go. I'm reading up about them right now as I (like you mentioned) am not quite sure how to use them best.

Do you know if it would be possible to display the product types in the child list in rows as well? If I were to put all the information in columns the page would look very crammed i think.

As far as my logic goes, it would be great if were possible to layout an item in a childlist with a flypage. But to be honest, I have no idea if this possible as far as the programming is concerned.

I'ld definitely like to hear more about how what changes you made and perhaps others can share their thoughts as well?

Thanks again,

Jesse