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

Poiter

  • Beginner
  • *
  • Posts: 13
Hi,
First of all, thanks for the mod. It's really great.
But I have a few questions.
I've made a site where you can buy online prices (using joomla 1.0.12 and VirtueMart 1.0.9).
www.hacomassen.nl/hacom
The prices are different because of the lenght of the prices. Also you can choose an "afslag" I don't know the English word. But I have some pictures to make it clear :
Click "Kies hier uw afslag" and then a popup will appear.
http://www.poiterdesign.eu/Hacom/afslag.gif
This is the pop up
http://www.poiterdesign.eu/Hacom/afslagen1.gif
There about 150 different "afslagen" I fixed it with a popup where you have to choose the number of "afslag" you like en then select the number with an dropdown button.
Is there a possibility too use radiobuttons on the popup, so you can choose your "afslag" right away and don't have to do 2 unneccesary things.

Second question. Also you can write a text that will appear on the price when you order. But I nead 3 rows with an limit of characters for each child item. At the moment I only know how to make 1 row for each child and cannot make a limit for the characters.
Character at the "graveertekst" ;
http://www.poiterdesign.eu/Hacom/graveren.gif
Also when you don't write a text, you cannot order any prices. You need to fill in this. I can solve it ,with the mark that people who don't want text, the need to write "nothing" in the field. But that's not really friendly for customers.
Is there an solution for this.

Maybe difficult questions, but it would be really great if someone can help me with this. The question with the popup isn't the important one, but with an sollution it makes the usability much better.

Thank you very much in advance

Poiter

macallf

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

The striked out prices, I forgot to put in the fix to remove it from normal prices and this has been asked many times in this thread.

Please check here on how to fix it http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=15697.msg67352#msg67352

The attributes do still show the currency, I have not changed how this works at all!

Check here and you can see it working. This is J! 1.0.12 and VM 1.0.10 and my mod with no changes to the files.

http://development.markcallf.co.uk/index.php?page=shop.product_details&flypage=shop.flypage&product_id=1&category_id=1&manufacturer_id=0&option=com_virtuemart&Itemid=26

The probelm with having one drop down box is that all products would inherit that attribute, most people would not need this, in fact they would need it to be the way it is.

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.

macallf

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

These are actually nothing to do with this mod but standard virtuemart features.

Somebody has posted a hack to allow radiobuttons for attribute selection, but I wouldn't know how to do it in a popup and return the info to the shop page!

The second one is a simple fix.

in shop.cart you will find this line

if ( ($result["attribute_given"] == false && !empty( $result["advanced_attribute_list"] ))
          || ($multiple_products == 1 && ($result["custom_attribute_given"] == false && !empty( $result["custom_attribute_list"] ))) ) {

change this to

if ( $result["attribute_given"] == false && !empty( $result["advanced_attribute_list"]  )) {

This removes the check for an empty field.

The size of the field is set in ps_product_attributes. function list_custom_attributes

You would have to change this line from

$html .= "<input type=\"text\" class=\"inputbox\" id=\"".$titlevar."_field\" size=\"30\" name=\"$titlevar$prod_index\" />";

to

$html .= "<textarea  cols=\"40\" rows=\"3\" class=\"inputbox\" id=\"".$titlevar."_field\" size=\"30\" name=\"$titlevar$prod_index\" /></textarea>";

Obviously change the cols and rows to suit your needs.

I hope this help

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
« Reply #408 on: March 13, 2007, 16:03:06 pm »
Hi
Can you point me in the right direction to bring back the 'Usually ships in' text. I need to bring this back for each parent. All child items have the same 'usually ships in' parameter, but I am not sure where to look for the code

John

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
Hi John,

that is done in ps_product.php

show_availability. VM checks to see if the product has children, if it has it doesn't return anything. You would have to modify this part to work the way you want.

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.

Lain_

  • Jr. Member
  • **
  • Posts: 92
Re: MOD: Child list instead of drop down. UPDATE(1
« Reply #410 on: March 13, 2007, 16:58:47 pm »
Quote from: Mark
The attributes do still show the currency, I have not changed how this works at all!

Sorry to say Mark..but your example website, which has the exact same attribute drop menu does not work just like mine. The problem is, as an example on your site when you select a product...I used the shovel on your site as an example.

So the base price is $5.40 for the "small" shovel..then you have a drop down below that to select "options"..so I select the XL+1.99 option and add to cart. The total amount should reflect a price of $7.39 ($5.40 base price +$1.99 option =$7.39)

But just as on my site, and yours the price in the cart is still only the base price. Thats a problem I need to resolve before I can use this awsome mod.
...........Of all the places I have ever been, Earth has the best popcorn.

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
Re: MOD: Child list instead of drop down. UPDATE(1
« Reply #411 on: March 13, 2007, 20:22:52 pm »
Quote from: Mark
The attributes do still show the currency, I have not changed how this works at all!

Sorry to say Mark..but your example website, which has the exact same attribute drop menu does not work just like mine. The problem is, as an example on your site when you select a product...I used the shovel on your site as an example.

So the base price is $5.40 for the "small" shovel..then you have a drop down below that to select "options"..so I select the XL+1.99 option and add to cart. The total amount should reflect a price of $7.39 ($5.40 base price +$1.99 option =$7.39)

But just as on my site, and yours the price in the cart is still only the base price. Thats a problem I need to resolve before I can use this awsome mod.

That was because the method for checking advanced attributes has changed!

This took me a while to sort out, but thank you for pointing that out (It also causes a problem in VM1.1!)

I have updated all the files and attached here. (The change was only ps_product_attribute, so you could just replace that one!)

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.

dj4967

  • Beginner
  • *
  • Posts: 11
This is biazzare...I installed the new Mod...made the list with add to cart on each child. Worked fine. I would add item and it would stay on the product description page stating tht it added fine.

THen for some reason it now goes to the cart instead of staying on the products page with the childs.

Wht happened?

Thx

Doug Hicks

  • Beginner
  • *
  • Posts: 1
Re: MOD: Child list instead of drop down. UPDATE(1
« Reply #413 on: March 20, 2007, 18:07:31 pm »

Mark, Installed this hack and works fine.
Question: Can you make the parent details show only once, instead of on each child product.

Riccardo

  • Jr. Member
  • **
  • Posts: 58
hi all, i would like to know if it is possible to do this:
i have a parent product and in its detail page i can see the list of chil items with their attributes, prices etc.

i usually use the list instead of the dropdown and with no link to the child item detail page, i need them in a list in the parent prod. flypage but...

is it possible to have the availability shown as the attributes for each item?

like this:

|availability|Prod.Name|Attribute list|Price|Quantity|AddtoCart|

hope this is clear enough 'cause  my site is offline yet and i have no link now.

i like this mod a lot but i need this modify so i hope you guys can help me.

i thank you
Ricky

Peace!

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
In the code there is already a stock level addition. This displays the current in stock quantity.

In ps_product_attribute.php you will find these lines (they appear twice)

/Product Stock Level Addition
                //
                if($local_shop) {
                    $html .=  "<td align='right' width='5%'>";
                    $html .= " " . $db->f('product_in_stock') . "</td>";
                    $columns++;
                //
                //End of stock Level
                }

if you remove the code in red it will display the current stock level.

You may have to move this further up the code to suit your requirements.

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.

Riccardo

  • Jr. Member
  • **
  • Posts: 58
thank macallf for the quick reply, now i try the modify. thanks again and compliments for the mod you made!!

Peace!

Riccardo

  • Jr. Member
  • **
  • Posts: 58
Re: MOD: Child list instead of drop down. UPDATE(1
« Reply #417 on: March 21, 2007, 16:06:10 pm »
i'm sorry macallf but maybe i didn't understand very well the instruction because nothing happen. i deleted the red code but no success, i tried to move the rest of the code up and down but i don't know where to put it so i can't see the availability.

can you help me again? thanks mac

Peace!

excogitation

  • Beginner
  • *
  • Posts: 28
Will this Mod be integrated into a future version of VirtueMart?

deneb

  • Full Member
  • ***
  • Posts: 654
Re: MOD: Child list instead of drop down. UPDATE(1
« Reply #419 on: March 22, 2007, 00:31:19 am »
Will this Mod be integrated into a future version of VirtueMart?

yep