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

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
I have an updated ps_product_attribute.php file childlist 1.0.10 that handles child attributes as well as parent attributes

i.e. if a child has attributes or custom attributes then they will be used if not and the parent has attributes then they will be used.

This can be download from Mark Callf Design direct link ChilLlist Downloads

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.

dj4967

  • Beginner
  • *
  • Posts: 11
Can I include Custom Attributes Extended 2.0 [Hack] into your tweak?

Im looking for the extras that this hack has but need your tweak.

I looked at the difference in files...huge difference.

anyway of implementing this?

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
It should be possible, but there is a difference in how my mod references the product Id. Because I am using a multiple add to cart and need to know both the child id and the parent id.

In most cases product_id becomes the parent id and prod_id becomes the product id, plus I do extra checks to in the attributes to see if it is a parent or a child and get the appropriate id for the function.

Because of this there will be a need to alter the custom attribute hack to work with prod_id and at the moment I do not have time to do this. But it is possible.

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.

wae

  • Beginner
  • *
  • Posts: 20
Mark, or anyone else - do you see a problem with implementing the "Save Users Cart in Database" mod with the Childlist mod?  with no tweaks, everything works fine - except for the delete cart function.  I can delete items individually no problem.  The users' cart is saving a-ok, too.

At this thread:

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

the mod's author suggests just placing this code:
Code: [Select]
$q = "UPDATE #__{vm}_cart SET cart = '' WHERE cid = '". $_SESSION['auth']['user_id'] . "'";
$db->query ( $q );

on the function that empties the cart on the chlidlist mod. 


Call me a big dummy - but I'm not sure where that would be??  Many thanks!!

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
The childlist mod does not empty the cart any differently than the standard VM install.

I think you may be thinking of something else. The file ps_cart is changed considereably but it should be easy to just place the relevant code in the correct places.

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
IMPORTANT NOTICE
All further updates will only be available on  Mark Callf Designs


New version for VM 1.0.11 Available on my site
Mark Callf Designs

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.

eda

  • Beginner
  • *
  • Posts: 7
Hi, I use VirtueMart 1.0.10 with the modified files of child list and it works well.
I have 2 shopper groups (Private users and Wholesale) that see diferent prices thas means default price for wholesale and increased prices for private users.
The private users when login the shop and a add a product to shopping cart see correct price but after filling the form of billing information the price changes into the default price of the product that is assigned to wholesale users.

Can you help me??


macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
That's because the default shopper group gets assigned to newly signed up shoppers.

If your default group is wholesaler, then any new registerd user is assigned to wholesaler.

The default shopper group should be default with the higher prices assigned, when a user registers as a wholesaler then manually assign them to wholesaler and they will see the lower price.

But having said that, I've tried every combination possible and can't replicate the fault.

Unless you have set a default price for the parent and only applied the wholesaler price to the child.

You will have to post exactly how you have set up your groups and the pricing information for a parent and children that cause the problem

i.e. shopper group set to default.

price set in parent for default and wholesaler.
price set for children, default and wholesaler

Maybe then I can see for myself if there is a problem

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.

eda

  • Beginner
  • *
  • Posts: 7
Hi Mark,
Thank you for your quick response,
Here I provide you the current configuration of my shop.









The Default shopper group is Private User with increased prices and 20% tax fee
wholesales are asigned without any fee so they are able to se the prices I've asigned to products in the product form.

If you want to have a look by yourself at my web I'll be happy to provide you admin credentials.
Thanks again
Eda

Liz

  • Beginner
  • *
  • Posts: 18
okay this may have come up before but i searched and cant find the answer. i installed this mod and THANK YOU it works great and is exactly what we needed.

one thing i cant figure out though. the button is now update cart and not add to cart. and then once it does the update it just refreshes the page instead of showing the cart.

is there a way to get the add to cart action back?

thanks, Liz

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
When using a single addtocart button, the action changes to update.

Why?

If you hit addtocart again by mistake you don't get all your products added to the cart again.(My mod shows the current quantity in the cart). That's why I changed the action.

e.g. you have added 3 of child a, 2 of child b and 4 of child c. You change your mind and decide to have 2 of child c. If it wasn't changed to update cart, then you would have 6 of child a, 4 of child b and 6 of child c.

To go o the cart after adding to the cart just unselect the new option in the main configuration of VM. Show cart on add. This allows you to turn it on and off. (This is explained on my site).

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.

Liz

  • Beginner
  • *
  • Posts: 18
Re: MOD: Child list instead of drop down. UPDATE(1
« Reply #506 on: June 27, 2007, 06:33:47 am »
Thanks for the explanation!! great Mod!!

Liz

  • Beginner
  • *
  • Posts: 18
one more question: after installing the mod my browse category page changed. now it has two lines i didnt have before and would like to remove...
"more categories" and "This category is currently empty"
see the pix below...

is this fixable?

thanks!

[attachment cleanup by admin]

MyMusicVid

  • Beginner
  • *
  • Posts: 41
    • Music videos site
I'm using the latest version of this mod with Joomla 1.0.12 and VM 1.0.11, but I have a problem where the custom attribute field on a parent with no childen is not appearing on the page. I've verified that it appeared before applying the Childlist mod.

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
I missed that one! Thanks for pointing it out.

edit ps_product_attribute.php in your-site/administrator/components/com_virtuemart/classes

starting at line 728 you will find this code

      if($prod_id) {
          $q = "SELECT product_id, attribute FROM #__{vm}_product WHERE product_id='$prod_id'";
          $db->query($q);
            $db->next_record();
        }
        if(!$db->f("attribute")) {
            $q = "SELECT product_id, attribute FROM #__{vm}_product WHERE product_id='$product_id'";
          $db->query($q);
            $db->next_record();

        }

change it to this

      if($prod_id) {
          $q = "SELECT product_id, custom_attribute FROM #__{vm}_product WHERE product_id='$prod_id'";
          $db->query($q);
            $db->next_record();
        }
        if(!$db->f("custom_attribute")) {
            $q = "SELECT product_id, custom_attribute FROM #__{vm}_product WHERE product_id='$product_id'";
          $db->query($q);
            $db->next_record();

        }

I have tested and that sorts out the problem.

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.