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

Lev

  • Jr. Member
  • **
  • Posts: 59
Done as you suggested. Cloned a product; added an attribute (not that I can understand the purpose of adding an attribute: why do I need using attributes if I just wan tto create several child products, each one with its own set of properties?!), saved, returned to Edit Product view.

No New button. Just no button!

Where do we go from here?

Lev

  • Jr. Member
  • **
  • Posts: 59
Wow. Sorted this one out as a woraround:

there is no New button - but in Edit Product view, Products ==>Current Product ==> Add Item is another way of accessing Add Child Product form.

Ooopsie...

Now after closing and reopening the parent product, there IS a New Item button... Go figure...

Sorry to be such a bother folks; it seems everything is working fine now, and I have been able to create three child products that appear as a list in the Product Browse page. thanx to everyone for reading - let me know if you need help on creating a child product list, and I will walk you through.

Extra thanx to Mark.

Cheers -

L

Lev

  • Jr. Member
  • **
  • Posts: 59
I guess I got too happy too early.

Started adding another product. Added what is supposed to be a parent product; tried adding a chile product - no go again. No New button and no Products ==>Current Product ==> Add Item path either. I'm stuck again.

Mark, can you sort this one out? I am obviously doing something wrong, and it must be pretty stupid - but I cannot figure out what it is. I keep going in cirlcles trying to catch my own tail...  >:(

Lev

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
To create child products

1. Create parent product and save
2. Edit product and click icon 'add attribute' - This is what distinguishes each child from the other e.g. size or colour or size and colour, you can add more than 1 attribute to the parent product. DO NOT CONFUSE THIS WITH ADVANCED ATTRIBUTES on the product status tab.
3. Save attribute
4. Go back to parent product, you will now have the 'new item' icon, this will create your first child product.
5. At the bottom of the 'product status tab' you will see a new item or items, which are the attributes you created in the second step, You must enter something here!
6. Save you r child product and go back to the parent and click 'new item' to crreate the rest etc.

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.

Lev

  • Jr. Member
  • **
  • Posts: 59
Got it; works fine both on localhost and at the server. thanx!

Now the spoiler. I do NOT need attributes. The parent product is a textbook. The child products are an answer key, an audio CD and/or a cassette tape. What I need is the following product structure:

Parent product: textbook title.
Child products:
-textbook
-answer key
-audio CD.

These three do not seem to have any common parameter that could be declared an attribute... :(

Does it mean that using child products is not for me and I will be better off using categories and subcategories and "Related Products"? Or is there a way of disabling the validation mechanism that requires the presence of at least one attribute before child products can be added?

TIA -

L

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
Use a bit of common,

I would use Format or Type. And remember You can not buy the parent product either! This would be another child. e.g. Format : Text Book,Answer Key,Audio CD, Cassette Tape

It's not that difficult surely!

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.

John - Australia

  • Beginner
  • *
  • Posts: 47
Re: MOD: Child list instead of drop down.1.10.1
« Reply #441 on: April 16, 2007, 09:13:18 am »
Hi
I have installed this but have lost the strike out price/discounted price feature for products without child items
Where a product is a single parent, I need to show the Gross price struck out, and then the discounted price where it shows the qty box and add to cart.

How can I get this back
John

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
That I have not changed. I just made alterations to the child products!

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.

John - Australia

  • Beginner
  • *
  • Posts: 47
Hi
I upgraded from 1.0.7.where a single product with no children doesn't show prices next to the qty box
I either need too show the gross price struck out, and the discount price, or no price at all.
Where do I look

John

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
Sorry John, you were dead right!

In shop.product_details.php look for this section of code

$price = "";
        if( $_SESSION['auth']['show_prices'] && _SHOW_PRICES) {
            $price = $ps_product->get_price($db_product->f("product_id"));
            if( $_SESSION["auth"]["show_price_including_tax"] == 1 && $price) {
                $tax_rate = 1 + $ps_product->get_product_taxrate($db_product->f("product_id"));
                $price['product_price'] *= $tax_rate;
            }
            $addtocart .= "<td align=\"right\">".$CURRENCY_DISPLAY->getFullValue($price["product_price"])."</td>";
        }

and replace it with this

$price = "";
$actual_price = "";
       if( $_SESSION['auth']['show_prices'] && _SHOW_PRICES) {
            $price = $ps_product->get_price($db_product->f("product_id"));
            $actual_price = $ps_product->get_adjusted_attribute_price($db_product->f("product_id"));
            if( $_SESSION["auth"]["show_price_including_tax"] == 1 ) {
                $tax_rate = 1 + $ps_product->get_product_taxrate($db_product->f("product_id"));
                $price['product_price'] *= $tax_rate;
                $actual_price['product_price'] *= $tax_rate;
            }
            $addtocart .= "<td align=\"right\">";
            if($price['product_price'] != $actual_price['product_price']) {
                $addtocart .= "<span style=\"color:red;\">\n<strike>";
                $addtocart .= $CURRENCY_DISPLAY->getFullValue($price["product_price"])."</span></strike>&nbsp;";
                $addtocart .= $CURRENCY_DISPLAY->getFullValue($actual_price["product_price"])."&nbsp;";
            }
            else {
                $addtocart .= $CURRENCY_DISPLAY->getFullValue($price["product_price"])."&nbsp;";
            }
            $addtocart .= "</td>";
        }

That will sort it out!

I will make sure this is included in the next version!

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.

John - Australia

  • Beginner
  • *
  • Posts: 47
Re: MOD: Child list instead of drop down. UPDATE(1.0.10) price
« Reply #445 on: April 16, 2007, 12:34:17 pm »
Hi
found it at line 379- fixed and working like a dream
Your help is invaluable
John

Radek

  • Beginner
  • *
  • Posts: 1
Re: MOD: Child list instead of drop down. UPDATE(1
« Reply #446 on: April 20, 2007, 00:52:09 am »
Hello!

I found the shop.product_details.php but I can't find the code you mentioned :(
Is it the files located in administrator/components/com_virtuemart/html ?

My problem is that only net price is showing :(

John - Australia

  • Beginner
  • *
  • Posts: 47
Re: MOD: Child list instead of drop down. UPDATE(1
« Reply #447 on: April 20, 2007, 02:47:51 am »
Hello!

I found the shop.product_details.php but I can't find the code you mentioned :(
Is it the files located in administrator/components/com_virtuemart/html ?

My problem is that only net price is showing :(
Hi
it is in
administrator/components/com_virtuemart/html/shop.product_details.php

at about Line 379 after
// If this is not a list and has no children display the standard page (handles drop down as well)   
   if (!$list || $nochilds ) {
        $bgcolor=SEARCH_COLOR_2;
        $addtocart .= "<input type=\"hidden\" name=\"prod_id[]\" value=\"$product_id\" />\n
        <input type=\"hidden\" name=\"product_id\" value=\"$product_id\" />\n
        <input type=\"hidden\" name=\"parent_id\" value=\"$product_id\" />\n
      <table width=\"100%\" style=\"vertical-align: middle;\" class=\"child_list\">
        <tr style=\"vertical-align: middle;\" >";
        $addtocart .="<td align='left'>".$db_product->f("product_name")."</td>";
        if($db_product->f("product_unit")) {
            $addtocart .= "<td>".$db_product->f("product_unit")."</td>";
        }

Lev

  • Jr. Member
  • **
  • Posts: 59
Folks,

I have installed the child_prod mod, played with it and found it unsutable for our purposes (we have sets of a textbook/answer key/audio cassette as products - this is not a parent/child arrangement), so we decided to abandon the idea and return to "standard." I replaced the modded files with the original files, back to Square One. :)

At the moment, we use Attributes to merge three levels of the same textbook (beginner/intermediate/advanced), and it works OK for us.

However, I liked two things:

1. The ability to display products as a list, not as a drop-down.
2. The ability to prevent VM from showing the cart after the product has been added (you know what I mean: you add a product, but you don't see the cart content at once - you can continue shopping from the same product page, then request to show the car and complete the order).

The question is:

how can I reconfigure VM to display products this way?

TIA -

L

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
Easy, use the mod but dont use child products!

It doesn't interfere with out the rest of the shop works. In fact, if you want to use drop downs for childlist as per normal you can.

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.