PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Classifieds How do I...? (http://www.photopost.com/forum/classifieds-how-do-i/)
-   -   How can I add a 20 day auction option? (http://www.photopost.com/forum/classifieds-how-do-i/141678-how-can-i-add-20-day-auction-option.html)

bendy January 10th, 2010 06:50 AM

How can I add a 20 day auction option?
 
I'd have thought I could add / edit this bit of uploadproduct.tmpl in order to change the lengths of the auctions available.

Code:

Content visible to verified customers only.
BUT, if I add another option or even change one of the existing ones (eg. I changed out the 90 day for a 20 day) I get a blank space on the dropdown menu of auction lengths, and if I select the blank space where my option should be, I get the default auction length of 15 days. If I change it back to the original number, it reappears and works as originally intended.

I even tried altering the default selected one to be the 20 day auction (simply changed option value="15" to "20") and that still defaults to the 15 day auction.

Are these auction lengths coming from somewhere else? Is there another file I need to edit to add a 20 day auction option? What's the deal with uploadproduct 1,2,3 and 4?

thanks in advance, this is driving me nuts.

Chuck S January 10th, 2010 08:48 AM

You have not added the appropriate language string in the languages so of course it is going to be blank. This would work

Code:

Content visible to verified customers only.

bendy January 10th, 2010 01:17 PM

That makes the 20 days option appear in the drop down list nicely, but when it is selected the auction still defaults to 15 days duration.

Code:

Content visible to verified customers only.
The other ones work ok, but not the one I added.

Oddly the other ones default to 15 even if I change the option value (ie. if I change 15 to be 20, it's still 15 when the auction starts. So where is it getting 15 from?)

Chuck S January 10th, 2010 01:23 PM

Your telling me if you upload an ad and select a duration it is only set to 15?

bendy January 10th, 2010 03:16 PM

If I upload an auction and select my new 20 day duration, the resulting auction is only set to 15 days, yes.

Seperately (ie. reverting back to standard template and trying something different) editing any of the standard durations will result in a new auction also being set to 15. For example:

Code:

Content visible to verified customers only.
The above would still give me a 15 day auction, even though option value 15 isn't anywhere in the code.


NB, in case it makes any difference, that these are auctions rather than straight ads.

All I need is to be able to hardcode in a duration of my choice - my install isn't for user use, just for the admin (me) to run one auction.

bendy January 11th, 2010 09:43 AM

New install on the live server (I was testing on my dev server before) and the same problem persists.

Adding
Code:

Content visible to verified customers only.
to the list of options gives me a 15 day auction.

What about uploadproduct1 .. 4.tmpl, do those need to be modified as well?

Chuck S January 11th, 2010 10:47 AM

Yes you need to modify all the templates you want.

Unless you have altered something incorrectly I have tested the default duration functionaliity in the program and see no issues.

20KingSize April 3rd, 2010 11:57 PM

i had the exact same issue with this, in the uploadproduct.php

there is a missing array in the original file

$checkduration = array("3", "7", "15", "30", "45", "60", "90");
if (!in_array("$duration", $checkduration)) {
$duration = 15;

because this array value is missing it treats it as 15

so the solution to your problem will have something to do with that, my guess is because "20" is not in the array its treating your 20 day auction like a 15 day auction.

have a read of this thread it might help you out

http://www.photopost.com/forum/class...y-auction.html

Chuck S April 4th, 2010 08:14 AM

yes I posted my thoughts on that


All times are GMT -5. The time now is 05:52 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97