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

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
Re: MOD: Child list instead of drop down. UPDATE (1.0.6)
« Reply #105 on: August 20, 2006, 22:20:43 pm »
eureka!!!! thanks VERY much! :)

So the last thing that I would love to be able to have are column headings for the child lists,

eg. Product, Attribute Name, In Stock, Price.

I tried adding this myself but somehow managed to break everything! will keep trying and if I get it right i'll post it here if not I would appreciate it if u could help me!

Thanks for everything Mark
Ruby



Hi Ruby

I have completed a modification to show Headers

in ps_product.attribute.php

after line 264

                // Start row for this child

insert this code

                // Show Header row
                if($ci == 0) {
                    $html .= "<tr><th>Description</th>";
                    $q = "SELECT product_id, attribute_name FROM #__{vm}_product_attribute_sku ";
                $q .= "WHERE product_id='$product_id' ORDER BY attribute_list ASC";
                $db_sku->setQuery($q);  $db_sku->query();
                while ($db_sku->next_record()) {
                   $q = "SELECT attribute_name ";
                   $q .= "FROM #__{vm}_product_attribute WHERE ";
                   $q .= "product_id='" . $db->f("product_id") . "' AND ";
                   $q .= "attribute_name='" . $db_sku->f("attribute_name") . "'";
                   $db_item->setQuery($q);  $db_item->query();
                   while ($db_item->next_record()) {
                      $html .=  "<th >";
                      $html .= " " . $db_item->f("attribute_name") . "</th>";
                   }
                }
                    $html .= "<th>Price</th><th>Quantity</th></tr>";
                }
                // End show Header Row

You can obviously alter the standard headings between the <th> and </th> accept the one $db_item->f("attribute_name") this picks up the attribute names from the database.

Hope this helps

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.

rub3licious

  • Beginner
  • *
  • Posts: 18
Re: MOD: Child list instead of drop down. UPDATE (1.0.6)
« Reply #106 on: August 21, 2006, 14:44:41 pm »
MARK U ARE A STAR!

Once again worked perfectly.

I truly appreciate the time you took to help me out with this.

I strongly believe that everything you have done here should be fully incorporated into the next release of Virtuemart.

Very Well Done!

Now my site does exactly what I want it to do! Thanks again!

Ruby
http://www.productionkit.co.za
"Not everything that can be counted counts, and not everything that counts can be counted."
    - Albert Einstein (1879-1955)

Davec

  • Jr. Member
  • **
  • Posts: 57
Re: MOD: Child list instead of drop down. UPDATE (1.0.6)
« Reply #107 on: August 21, 2006, 22:48:15 pm »
Hi I have a little query. The mod looks great and will hopefully meet my needs. But is it possible to have a series of boxes where you enter the quantity required and one checkout button? Something like this site http://www.event-shirts.co.uk/design_your_own_t-shirt.php?oscsid=b43e49fd8bd2e64749a54cd31b6b48ee on the bottom right you can select small mediam large etc and then click the button to add to cart.

Dave :)

Davec

  • Jr. Member
  • **
  • Posts: 57
Re: MOD: Child list instead of drop down. UPDATE (1.0.6)
« Reply #108 on: August 22, 2006, 00:24:32 am »
Well I have sinced realised that can be done and have started to arrange the cart. Now as I am using it for clothes with sizes and colours I need to sort the layout order. Ie I have small, medium, large etc. At the moment it list in alphabetical order ideally I need small then medium and so on.

Any suggestions


Dave  ???

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3700
  • using Matomo instead of Google Analytics
Re: MOD: Child list instead of drop down. UPDATE (1.0.6)
« Reply #109 on: August 22, 2006, 13:43:29 pm »
Hi Mark,

I still have empty cells in my "Add to Cart" table. If there is no child product, the cell shows the product unit, i.e. "piece". If there is one child product, there are two empty cells, if there are two child products, I get three empty cells between the product name and the product price in the table. Is it possible, that this is related to the VM language file? I noticed that this cell is not updated when I change languages. Normally I have everything set to german language.

Perhaps you can let me know what you changed in the original language file and I can translate and add these changes to the vM german language file.

Best Regards

Joerg
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

mark R

  • Jr. Member
  • **
  • Posts: 220
Re: MOD: Child list instead of drop down. UPDATE (1.0.6)
« Reply #110 on: August 22, 2006, 14:37:55 pm »
fantastic addition. to virtuemart

I have installed mod 106-1 works great, but is it possible to remove add to cart from the child list, for customers not logged in.  as i only allow prices etc to logged in users.  or completely remove the List/attributes for users not logged in.

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

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
Re: MOD: Child list instead of drop down. UPDATE (1.0.6)
« Reply #111 on: August 22, 2006, 19:47:41 pm »
Hi Mark,

I still have empty cells in my "Add to Cart" table. If there is no child product, the cell shows the product unit, i.e. "piece". If there is one child product, there are two empty cells, if there are two child products, I get three empty cells between the product name and the product price in the table. Is it possible, that this is related to the VM language file? I noticed that this cell is not updated when I change languages. Normally I have everything set to german language.

Perhaps you can let me know what you changed in the original language file and I can translate and add these changes to the vM german language file.

Best Regards

Joerg


JJk

the cells being displayed are the child attributes which are set when you create the child products i.e. size or colour or type etc

when you create a child product these items are entered at the bottom of the second tab - Item Status

see the included screenshots.

The only thing I can think of is that you have not entered any values for these and are just showing as blank.

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.

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
Re: MOD: Child list instead of drop down. UPDATE (1.0.6)
« Reply #112 on: August 22, 2006, 20:14:34 pm »
fantastic addition. to virtuemart

I have installed mod 106-1 works great, but is it possible to remove add to cart from the child list, for customers not logged in.  as i only allow prices etc to logged in users.  or completely remove the List/attributes for users not logged in.

thanks in advance
mark

Don't know what happened there, I normally check to make sure thats working correctly.

Anyway have modified the files and this should sort out the problems

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.

mark R

  • Jr. Member
  • **
  • Posts: 220
Re: MOD: Child list instead of drop down. UPDATE (1.0.6)
« Reply #113 on: August 22, 2006, 20:48:06 pm »
Mark

Thanks for the new release. 106-2 , unfortunatly there is still a problem with the product details page.
when a product has no child products the order quantity is still visible ??

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

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3700
  • using Matomo instead of Google Analytics
Re: MOD: Child list instead of drop down. UPDATE (1.0.6)
« Reply #114 on: August 22, 2006, 21:13:15 pm »
The only thing I can think of is that you have not entered any values for these and are just showing as blank.

Mark


Hi Mark,

Good guess!!! ;D
I never had the idea to scroll down below the grey box on that tab when entering data for a child product because there are no data entry fields when entering data for the parent product.

Many Thanks again!

Joerg
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

Davec

  • Jr. Member
  • **
  • Posts: 57
Re: MOD: Child list instead of drop down. UPDATE (1.0.6)
« Reply #115 on: August 22, 2006, 21:52:12 pm »
Well I have installed the updates but have a bit of a problem see below.

I am currently working on a site and have changed in the backend the flypages. The problem I appear to be having is this. If I go into a catergory (Only 1 has a product in at the mo) and click the add to cart button it returns to index.php and shows the wrong flypage. Not sure at all what is going on there.

I have one product on the site with 3 related ones, small, medium and large. If I add say 10 large to the cart it then goes to the wrong flypage. Pop on a try adding to cart and you will get the idea. It's drivng me mad!! Not sure if this is related to the mod or a problem in Virtuemart itself.

www.basic-box.co.uk/cms

mark R

  • Jr. Member
  • **
  • Posts: 220
Re: MOD: Child list instead of drop down. UPDATE (
« Reply #116 on: August 22, 2006, 22:02:08 pm »
Davec,

have you fixed it??   i have just had a look at your site and it seems to be working ok..  you might want to try clearing your browser cache.
Seek and ye shall find.........
4 VM sites and counting

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
Re: MOD: Child list instead of drop down. UPDATE (1.0.6)
« Reply #117 on: August 23, 2006, 00:04:58 am »
Mark

Thanks for the new release. 106-2 , unfortunatly there is still a problem with the product details page.
when a product has no child products the order quantity is still visible ??

thanks again
mark

Sorry about that!!!

change html/shop.product_details.php line 391 from

        if(USE_AS_CATALOGUE != 1) {

to

        if(USE_AS_CATALOGUE != 1 && $_SESSION['auth']['show_prices']) {

this will fix the problem

Well I have installed the updates but have a bit of a problem see below.

I am currently working on a site and have changed in the backend the flypages. The problem I appear to be having is this. If I go into a catergory (Only 1 has a product in at the mo) and click the add to cart button it returns to index.php and shows the wrong flypage. Not sure at all what is going on there.

I have one product on the site with 3 related ones, small, medium and large. If I add say 10 large to the cart it then goes to the wrong flypage. Pop on a try adding to cart and you will get the idea. It's drivng me mad!! Not sure if this is related to the mod or a problem in Virtuemart itself.

www.basic-box.co.uk/cms

same as mark r's reply. Checkedout the site and it is working correctly. I tried the Hooded jumper and it added to the cart correctly.

Hope this all helps
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.

Davec

  • Jr. Member
  • **
  • Posts: 57
Re: MOD: Child list instead of drop down. UPDATE (1.0.6)
« Reply #118 on: August 23, 2006, 09:09:28 am »
 :-\ Can't believe I didn't clear cache first DOH! That is the first thing I do as a rule when someone tells me they can't see a new page. To many late nights I think.

Now when you go to the cart after adding products it shows the attribute HJ as I added no text it shows 2 brackets. Is there a way to hide or remove that the atributes in the page.

Oh and if you thought front page with cats on looked bad, it is far from finished and I have some sorting to do  ;D

Dave


rub3licious

  • Beginner
  • *
  • Posts: 18
Re: MOD: Child list instead of drop down. UPDATE (1.0.6)
« Reply #119 on: August 30, 2006, 11:18:17 am »
Hi Mark,

I need an option for clients where:

(My silly little algorithm for it)

If product_in_stock > 1 then
        display  Add to Cart
else
        display request stock

(yes i am aware it's a million times more complicated than that)

I know this isn't related in any way to your module, but my issue is this:
Now that I have applied your MOD to my site I need to know where this code will have to be inserted relevant to your MOD.

My guess is in:
ps_product_attribute.php

Around line 394 where this code is found:
// Add button for Add to Cart
           
            $columns--;
            if (USE_AS_CATALOGUE != '1') {
            //print($_SESSION['auth']['show_prices'] );
            $colcount += $columns;

My concern is that I only have the one "add to cart" button at the bottom of my table list of children, so in a scenario where at least one of the children has stock and at least one doesn't I guess I would then need two buttons at the bottom, one for "add to cart" and a second one for "request stock".

And then not related to your mod in:
shop.product_details.php

Do you think there is any other file I should need to modify too?

Seeing as I don't allow customers to add to cart when they are not in the details of the product itself I think that would be it.

Any advice you could give me here would be VERY much appreciated.

The idea behind this is that if an item is out of stock, instead of simply being notified when it comes back into stock the "request stock" button would then grab the productID and quantity requested and send an email off to the administrator (cc'd to the user) requesting it to be ordered in. And then notify can still be used to inform the customer that it has arrived.

I know you are, obviously, a very busy guy but in terms of feedback and assistance on this forum you have been a shining star. Even if you could just point me in the right direction I would really greatly appreciate it, if you are (like all of us) stripped for time and cannot help then thanks anyway for everything else you've done.

Much appreciated.
Ruby
http://www.productionkit.co.za


"Not everything that can be counted counts, and not everything that counts can be counted."
    - Albert Einstein (1879-1955)