Jump to content


  • Content count

  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
  • Gender
  1. Actually.. update! it doesnt work with single_dropdown either.. so both single display plugins... that narrow it down?
  2. Hi Im having problems with the radio option on the product page... with no changes to the class files and product_info page, everything else works great, but the radio option doesnt add anything at all to the cart. Is there any reason why this might occur? looking at the html source of the form it should work, I cant understand why it's not being sent to cart. Desperately need the help on this one as I CANT use the dropdowns in this design. I dont believe it to be a contrib conflict as all other form dropdown elements from QTPro work perfectly fine. This is the input generated for one of the radio buttons: <input type="radio" checked="checked" value="2-14" name="attrcomb"> Any reason why the value wouldnt be sent to cart on post? If you have no idea... please could somebody advise on which files are being utilised to add item to cart please... I'm searching through and I'm sure there's something I've missed. Thanks
  3. Sumisu


    Hi I'm having a problem :/ whenever I make ANY change to anything in the config or admin, Like change a value or click update, or click any button from the admin page, I get the following: Then, I think it crashes the server, because I cant access any page on the site (admin or catalog).. I cant even access my server via FTP. Any ideas?
  4. Sumisu

    Get 1 Free

    Hey Jim Nevermind looking for a solution.. I've found one :) I was trying to do literally the impossible before, could have kicked myself when I noticed. be sure I'll keep you updated when it finaly works with QTPro
  5. Sumisu

    Get 1 Free

    A million thanks.. I really need this, so it needs to be a good idea! I am 95% sure that im failing in not calling the array properly, because the code that uses it is perfectly fine, and I get the occasional errors: such a thing was expecting an array etc. it's not affecting anything that doesnt have QTPro installed, you already have the free product singular to the promotional product id anyway... by including this check for repeats before re-adding again, it creates the correct products array that everything else gets it's information from... dont worry, I'll be having the headache over that :) I just cant figure out how I'm supposed to be calling the products array properly because it's just not pulling through to my code as it does on blank php file with the EXACT array added manually. Actually, I might open up another post, take some stress off you digging blind just going off my explainations. If you do find anything, that's great.. I'll see if anyone else out there has some recent experience with this Anyway.. thanks so much for your help Martin
  6. Sumisu

    Get 1 Free

    Hello again regarding the update to allow it to work with QTPro attributes... I had a good look out there and nothing came even close to what I need, so I've decided (out of necessity) to go ahead and finish off the update. I've set it up so that QTPro product_id doesnt interfer anymore and sums up the quantities from repeated product_ids of promotional products, so the correct quantity is now applied to the free product and it doesnt matter if you have QTPro installed or not so if you like what i've done when I'm finished, I'll post it with instructions... my serious issue is..... I was wondering if you could lend me a little of your experience by advising me in the following (im reletively new(ish) to osc): I want to create a check in the classes/shopping_cart that uses the $products array to see if the FREE product has already been added to the $products array, and if it has, don't add it to the $products array... once that's done, I'm anticipating nothing else would need altering... except I might seperate the free product from the main table in the cart and have them render underneith so it can be nicely styled seperately etc... from the tests I've done, altering the area where $products array gets rebuilt to include your free product details, that should mean success !!! (and $orders at the bottom in the same way, yes? or not necessary? it certainly didnt apear necessary to change during tests) Right, so what's my problem then? ** bowing head in shame ** 1) Array to be checking against to see all products currently in cart --- $this->content or $products or Niether of the above? (im possitive this is where I'm failing!!! so if you could just give me an example like attach it to a variable for me so I can test and make progress for once) 2) how would you go about doing a check to stop repeats being written to the array? dont need you to do it for me, just like a rough idea, even if its just confirmation (my method below) that I've got the right idea. How I've been trying to do it is to use 2 nested foreach on the array to access the correct level, then do an in_array check for the free products id... bare in mind this is already being run within your IF statement that's already checked that the product ID is a free product... IF the check for Id comes back as true, don't write to Products array, else write it to Products array.. that sounds perfectly acceptable to me.. yet I've been doing it ALL DAY with no results! by the way, the IF statement would be for in_array && a check to see if it can find ['free'] => 1.... as I want to check the entire cart contents, and they might buy another of the free product aswell if they want more, so it doesnt interfer with the free product being added. does all this sound good enough to you? can you see anywhere where I'm going wrong? I've been smashing my head against a wall all day not getting anywhere with it... it works on my blank php test file with the array from print_r($products) manually added in !!! why not in osc? lol Google just isnt cutting it for this one :) thanks for all your help Martin
  7. Sumisu

    Get 1 Free

    OK - i give up :| haha managed to get it working without QTPro's influence by manipulating arrays - got it inserting correct quantity of free products after summing all of the (exploded) product id => quantities in the cart.... so 2 jumpers, 1 medium & 1 large came up with the correct number of free products, and so on. HOWEVER! haha ... problem is that it creates a free product with the correct quantity, but for each and every attributed product (of same origional qualifying product id) in the cart... so would need to be seperated from the table where the cart products are generated, to keep the free product seperate and some code to stop free product replicating everytime it sees a matching product id and so on and so on for all the qualifiers... think I'd rather put a gun to my head :/ haha, nar, I can see it taking me weeks and I dont have weeks to spare. So, does not work with QTPro... took me a while but I finaly realised that now :) haha Anyway, thanks for your help Martin
  8. Sumisu

    Get 1 Free

    Hi.. thanks for replying so quickly. OK, that's understood, but I do like your contrib a lot (bar this tweek I need ofcourse), so I cant help but want to give it a go :) I was thinking, I have looked at the echo on the QTPro edited product Id... its format is Product_id { QTPro_id } Attribute_id --- eg jumper small : 29{2}2 , jumper medium 29{2}3 .. etc. If I put an explode from the '{' on the full product Id and return the 0th from the array.. could create a product_id variable where all of the attributes under said jumper would be (for the example above) the same product id of 29 --- everything before the first { ... so that basically removes QTPros influance on your contrib regarding product ids wherever it may be needed. so, something like: $trueproduct_explode = explode("{",$products[$i]['id']); $trueproducts_id = $trueproduct_explode[0]; Now... given the fact that your contrib works even with the QTPro alteration to the product_id leads me to believe that on the side of running your qualifying checks it already looks up the origional product_id in the PRODUCTS table, OBVIOUSLY lol, (QTPro builds its new product Id from a seperate database table).. so i dont think thats the problem... I believe the problem resides in the catalog/shoping_cart.php, where the qtpro contrib conflicts by building seperate ids and ** generating seperate products in the shopping cart page table. ** so, im thinking that it's looking at the quantities of one shopping cart populated product at a time, and if that 1 product has the right quantity, update quantity of free product, and maybe product id isn't actually a problem regarding qualifying for free item. regarding checking quantity in cart, does checking multiple rows for matching id's sound like a simple enough modification to you? If i could just get it seeing 2 items of the same id --- even though they might be seperated in the page table, i think that would do it!!! I'm quite prepared to do the work to get it working and tested, I am still in training and enjoy the practice :) I think a little direction from the Dev that knows it best would help me A LOT though as I'm not 100% about how I'm going to do it :) haha Your advice would be very appreciated Thanks for your time Martin
  9. Sumisu

    Get 1 Free

    First, a BIG thanks for the contrib. I have installed on 2.3, had to make a few tweeks but no problems at all... works like a dream... and excellent install instructions, thanks for making an effort! However... I was wondering if you could help me with a slight alteration that I require. I am using the QTPro contribution to allocate stock to my attributes... so say I have an Item of clothing in sizes - small, medium.. etc All I would like to ask is if it would be possible to have the Get1Free contrib check against product title (which will be unique and minus its attribute ofcourse) to make its check for quallifing for the free product because i think the QTPro creates seperate product id's for each attribute to asign stock to it - I THINK!!! I could be wrong. To give an example - Curently I have set - buy 2 jumpers, get a matching phone cover free (for example): when somebody buys 2 jumpers, but 1 in medium and 1 in large, there is no free product added.... only if you buy 2 jumpers both medium, for example, will it add the free phone cover. I DONT actually need to allocate a particular product attribute as a free product, so hopefully that makes it a lot lot simpler... just need the qualifier check altering perhaps. What I would like it to do is no matter whether the customer has selected 1 large and 1 small, it will still see that as 2 of that product and add the free product.. which is why I think prehaps doing the qualifier check against the product title.... would that be easy to alter? Any help you could provide would be very very apreciated. Thanks Martin