/    Sign up×
Community /Pin to ProfileBookmark

creating an item template for an online store

I’m working on a clients eCommerce website. He is selling vinyl graphics. He has over 246 libraries of images he wants to sell. Each library has about 50 images he can make and sell. Here is the file structure that im working with…

[url]www.hisdomain.com/images/library001/001.gif[/url]
[url]www.hisdomain.com/images/library001/002.gif[/url]

[url]www.hisdomain.com/images/library001/003.gif[/url]

[url]www.hisdomain.com/images/library002/001.gif[/url]
[url]www.hisdomain.com/images/library002/002.gif[/url]

[url]www.hisdomain.com/images/library002/003.gif[/url]

What I need to do is when some clicks on a link to “library001” I need to display a html page with “add to cart” form options for each of the image in that library and also display the image with the form. I’m hoping there is an easy way to dynamically do this, so I don’t have to create a form for each of the 12,000 items.

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@WebfreakMay 26.2004 — I've made a gallery for you. You can see it [URL=http://193.95.195.101/galerija/]here[/URL]

Here is php script: [code=php]
<?php

$picture = $_GET['pic'];
$libary= $_GET['libary'];
$pic_1=$picture;
$pic_1+=1;
$path="images/"; // set path to your pictures
if (file_exists($path.$libary."/".$picture.".gif")){
echo "<img src="".$path.$libary."/".$picture.".gif">";
} else {
header("Location: ?pic=1&libary=$libary");
}
?>
<br><br><br>
<a href="<?php $pic_1-=2; echo "?pic=$pic_1&libary=$libary"; ?>">Back</a> <a href="<?php $pic_1+=2; echo "?pic=$pic_1&libary=$libary"; ?>">Foward</a><br>
<br>
Add to cart

<br><br>
Form
[/code]


Now you have to tell me what kind of the form do need.

I hope this is what do you want to have ?
Copy linkTweet thisAlerts:
@mikeyzcauthorMay 26.2004 — [i]Originally posted by Webfreak [/i]

[B]I've made a gallery for you. You can see it [URL=http://193.95.195.101/galerija/]here[/URL]



Here is php script:
[code=php]
<?php

$picture = $_GET['pic'];
$libary= $_GET['libary'];
$pic_1=$picture;
$pic_1+=1;
$path="images/"; // set path to your pictures
if (file_exists($path.$libary."/".$picture.".gif")){
echo "<img src="".$path.$libary."/".$picture.".gif">";
} else {
header("Location: ?pic=1&libary=$libary");
}
?>
<br><br><br>
<a href="<?php $pic_1-=2; echo "?pic=$pic_1&libary=$libary"; ?>">Back</a> <a href="<?php $pic_1+=2; echo "?pic=$pic_1&libary=$libary"; ?>">Foward</a><br>
<br>
Add to cart

<br><br>
Form
[/code]


Now you have to tell me what kind of the form do need.

I hope this is what do you want to have ? [/B][/QUOTE]


Sort of. I was actually looking for when you click the "library" link it it populates the page with every image in that directory also giving each image it's own form with 3 text fields and a submit button.
×

Success!

Help @mikeyzc spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...