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

JJRO

  • Jr. Member
  • **
  • Posts: 62
Did that fix your problem, Andy?
I'm still having it jump to the cart...
The only other mod I did to the shop.browse.php was to have the category name replace the "BROWSE" text.
As per http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=15682.0

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
Re: MOD: Child list instead of drop down. UPDATE (
« Reply #376 on: February 16, 2007, 01:04:17 am »
Sorry for the terse nature of my last post. I was in a panic when I realised how much change was needed to make vm work for my app, and at the time your offering looked like a possible rather than a probable. But I'm delighted to say you look like saving my bacon. Very good! Many thanks. And you responded to my post faster than a paid helpdesk!

Not a problem, just glad to help. Sometimes an easy explanation is best.

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.

tim

  • Beginner
  • *
  • Posts: 2
Hello Mark,

Is there a possibility to order the childs by product SKU?
i am working with php for one month now but i just can't find the solution can you help me please?

Tim

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
Re: MOD: Child list instead of drop down. UPDATE (1.0.9) + store wide quantity m
« Reply #378 on: February 16, 2007, 12:34:04 pm »
Hello Mark,

Is there a possibility to order the childs by product SKU?
i am working with php for one month now but i just can't find the solution can you help me please?

Tim

Hi Tim,

I have covered that in a previous post! http://virtuemart.net/index.php?option=com_smf&Itemid=99999999&topic=15697.msg51683#msg51683

The files have changed some since then, so you'll have to search for the required lines and instead of product_id enter product_sku.

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.

Karsten Eichentopf

  • Beginner
  • *
  • Posts: 1
Re: MOD: Child list instead of drop down. UPDATE (1.0.9) + store wide quantity m
« Reply #379 on: February 16, 2007, 13:14:36 pm »
Some german translation for your hack. Copy this into VMs german php, germani.php or germanf.php:
var $_PHPSHOP_DISPLAY_USE_PARENT = 'Die Einstellungen der Kindprodukte überschreiben und die des Elternprodukts verwenden';
var $_PHPSHOP_DISPLAY_NORMAL = 'Standard Mengenanzeige';
var $_PHPSHOP_DISPLAY_HIDE = 'Mengenanzeige verstecken';
var $_PHPSHOP_DISPLAY_DROPDOWN = 'Dropdown Box benutzen';
var $_PHPSHOP_DISPLAY_CHECKBOX = 'Check Box benutzen';
var $_PHPSHOP_DISPLAY_ONE = 'Einzelne "In den Warenkorb" Schaltfläche';
var $_PHPSHOP_DISPLAY_MANY = 'Eine "In den Warenkorb" Schaltfläche für jedes Kind';
var $_PHPSHOP_DISPLAY_START = 'Start Menge';
var $_PHPSHOP_DISPLAY_END = 'End Menge';
var $_PHPSHOP_DISPLAY_STEP = 'Schrittweite';
var $_PHPSHOP_PRODUCT_FORM_ITEM_DISPLAY_LBL = 'Anzeige Optionen';

Sounds stupid and can be made better but i hope this helps. It took some time with a file merge tool to finde the var you use. IMHO it would be better if you used an own namespace for this. Now i can really use your plugin as i finnaly understand the settings ;)

As far i can see i have to update each single product? I really would like a shop wide setting.

Thanks for your work,

Karsten

tim

  • Beginner
  • *
  • Posts: 2
Thanks Mark,

I missed this solution, i love this xlnt MOD, works perfect!

Tim

silexian

  • Beginner
  • *
  • Posts: 9
Re: MOD: Child list instead of drop down. UPDATE (
« Reply #381 on: February 16, 2007, 18:29:34 pm »
Hi Silexian,

1. Do the children have the same parent? If they do then multiple child discounts should work, if they are from different parents then they won't.

Mark

Hello Macallf,

do you mean the discount or the price/quantity feature ?
Because I have set several prices to the parent ("add a price", with quantity).
and verified that the children products do not have a price set.

I have tested to add different children to the cart and the "price by quantity" feature is not applied on the whole product.

ex: I want to buy some shoes, and if I buy 2 shoes, i get them for a special price, no matter what size they are (the size is the criteria of the children products)

regards,
Silexian

Riccardo

  • Jr. Member
  • **
  • Posts: 58
Re: MOD: Child list instead of drop down. UPDATE (
« Reply #382 on: February 16, 2007, 18:35:12 pm »
hi, first of all... thx 4 all the works you're doing!!

i have some probs:
in the admin of vm i have no text in the tab added by the mod for the child properties, i have vm and J! in italian maybe i have to change something in my language file?

when i click the addtocart button for a child item it says that the quantity is more of the stocked quantity also if i have a lot of them available in the store. how can i fix this?

I use J!1012 and vm 109 (ecommerce ed)

hope that you can help me

thx for now

edit: now i can see the text.. i added missing voices in italian.php so this part is ok

but i have a lot of problem with addtocart beacause when i click on the button it goes in  a loop and reload the same page. maybe have you talk about this in past post? i'll do a search for this now... i'm sorry if i'm repeating questions but my connection is very slow and it takes a lot of time to take a look to 26 pages...i'll try.

hope you guys can help me with this great mod. thx

Andy

  • Beginner
  • *
  • Posts: 5
Re: MOD: Child list instead of drop down. UPDATE (
« Reply #383 on: February 21, 2007, 17:11:44 pm »
My admiration to macallf for the mod. It does work for me as I think it is intended to do, and very well at that.

But I did find limitations for my puposes, which reflect questions that have been put in the thread.

As others have mentioned, they would like to offer e.g. a line per t-shirt size and a dropdown for colour. Justin Z asked if he could "combine the use of child products and attribute dropdowns," which is a candidate solution to that need, and it does actually work up to a point.

For me though it won't be enough to use "attribute" dropdowns because I expect sparse product data, i.e. not all size/colour combinations are available. Even without stockkeeping on the system, every available size/colour combo needs to be in the product table as a child item, to prevent the customer ordering unavailable combinations. Each row listed must offer only the available colour combinations for that item.

On the other hand, although the data is technically 'sparse,' the explosion of combinations requires that most of the attributes drop down unless they create a price change. So size is a line and colour isn't, for example, and there are many everyday products with more attributes than this of course.

The other question that then arises is about 'Update Cart.' For me this doesn't work with combinations of list and dropdown.

Storyboard: Customer picks one XL in red and adds to cart. Customer comes back and enters two XL in blue and adds to cart. Customer comes back. What is the state of the display?
Or, to put it another way, cart state does not uniquely determine current detail display content (quantity, selected values of dropdowns) when there are many cart lines per product detail line.

 Actually, since as I say it is possible with the lister to create this story, I suppose technically this is a defect, although my argument says it's a limitation and I'm not surprised.

The examples I know of (no free advertising, but think 'clicks and mortar discount department stores with national advertising budgets') deal with this by making all posts to the cart inserts, no updates.

So you can revisit the cart adding one XL red, and each such revisit inserts a new order line. Each return to the shopping pages clears the detail page quantities for more *inserts*. The only way to update or delete picks is at the cart, not the detail page. Shoppers can happily place an order with several lines for the same product with the same or different quantity. My argument says there isn't another way.

Am I right in thinking that a) this is the situation and b) we're a bit away from being able to do this?

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
Re: MOD: Child list instead of drop down. UPDATE (1.0.9) + store wide quantity m
« Reply #384 on: February 21, 2007, 17:24:52 pm »
Andy,

How about trim that down and say what you mean!

Sorry, but I got confused and lost less than half way through this post.

I assume you are talking about the way the cart updates, if so more clarification would be helpful.

VM by defaul adds to the cart, each click of the add to cart adds to the cart.

However, when using a single add to cart for several items, thats not advisable. Hence the reason in that situation that the cart is updated with what ever values are on the product page at the time. (Otherwise defaulting to 1, a user would add every item to the cart once).

When coming back to a detail page that already has items in the cart, using one addtocart button, the display does reflect what is in the cart.

The other point about separating the combinations and making a pseudo drop down dependant on the attributes. That is possible, but one hell of a workload. I have, after all provided this for free and although many of you are developers and charging your customers for this I have had not one donation for doing this work from any of you.

So if you want a solution more specific to your needs, contact me and I'll give you an estimate!

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.

Andy

  • Beginner
  • *
  • Posts: 5
Re: MOD: Child list instead of drop down. UPDATE (
« Reply #385 on: February 21, 2007, 19:17:22 pm »
 I've nothing but respect for what macallf has contributed and I don't mean to prompt anything but enthusiasm. Hope all can read my post that way. If people reading this thread are analysts, developers or implementers or otherwise interested in this area then my post is aimed equally at them to contribute. I don't see why anyone would assume mcallf is going to do all the work. I don't. I trust he has more than earned the right to get a reward for his expertise by whatever business model he intends.

 My argument is dense and fully-argued so it wasn't going to be any shorter, I'm afraid, although some rich text headings would have helped. The storyboard is an exact description of the situation that leads from the technical preamble and description of needs above it.
Quote
"When coming back to a detail page that already has items in the cart, using one addtocart button, the display does reflect what is in the cart."

I used attributes (as in an entry in the child item jos_vm_product.attribute field) to create dropdowns, in combination with child products with attributes (in jos_vm_product_attribute) and macallf's lister, and it doesn't reflect in those circumstances, as I describe with the t-shirt storyboard.

Quote
"each click of the add to cart adds to the cart ...when using a single add to cart for several items, thats not advisable. Hence the reason in that situation that the cart is updated with what ever values are on the product page at the time. (Otherwise defaulting to 1, a user would add every item to the cart once)"
The default would be 0. Every time you enter the page you have picked nothing yet to add to the basket. I am arguing in the general case that the detail page shouldn't be a reflection of what's in the basket. The detail posts inserts to the basket. It's one-way traffic.

Maybe I misunderstand how this board runs. Is there a thread for hacks and a thread for architecture? I thought I read that what macallf is contributing is going into the 1.1 release. If so I would like to contribute my view on how this might develop, but I seem to have offended maccalf instead. If so, sorry. Repeat, "My admiration to macallf for the mod. It does work for me as I think it is intended to do, and very well at that." But I also think that it would be good if it were able to do what I have suggested, and my view is based on a what other e-shopping does, and reading what others have said in this thread.

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
Re: MOD: Child list instead of drop down. UPDATE (1.0.9) + store wide quantity m
« Reply #386 on: February 21, 2007, 19:26:35 pm »
Sorry for the mistake. You have now cleared a point up.

Attributes have never reflected what is actually in the cart I agree. Problem here is if there are 2 items added to the cart one with option 1 and another with option 2 what do you display as being selected?

There is a small mod to ps_product_attribute.php that will remove the quantity update on the details page, if that's what is required.

That's where the problem arises, hence I didn't change the way that works.

The original VM used to insert into the cart. Not add, but this changed recently. So I had a dilemma, do I change my mod to work totally in one way, or make it differentiate between the 2 scenarios.

I had to make choice, for the most part I believe the correct one.

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.

Andy

  • Beginner
  • *
  • Posts: 5
Re: MOD: Child list instead of drop down. UPDATE (
« Reply #387 on: February 21, 2007, 20:11:05 pm »
 I understand. Thanks for the direction, maccalf.

The "small mod to ps_product_attribute.php that will I think remove the quantity update on the details page" is a good steer which will fix the anomaly I report and leave the sparseness issues for another day.


macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
Re: MOD: Child list instead of drop down. UPDATE (1.0.9) + store wide quantity m
« Reply #388 on: February 21, 2007, 20:19:08 pm »
Attached

One modified ps_product_attribute, with the quantity update disbaled

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.

Darren Blade

  • Beginner
  • *
  • Posts: 6
Re: MOD: Child list instead of drop down. UPDATE (
« Reply #389 on: February 24, 2007, 13:57:13 pm »
I get

Fatal error: Call to undefined function: get_product_attribute() in /administrator/components/com_virtuemart/html/shop.product_details.php on line 349

after extracting the file for VM 1.0.9....

Do I need to make any changes manually after extracting the file or just extracting should be enough?

I get this too...could someone explain what might be causing the problem please. J1.12/VM1.09/lateste 1.09-1 hack