Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 VP-ASP 7.0 Questions
 Pre Ordering
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

bully456
Starting Member

United Kingdom
21 Posts

Posted - December 16 2014 :  12:03:10  Show Profile  Reply with Quote
Hello,
Here again to ask for advice with regards pre ordering. A fairly large part of our website shows stock that has yet to be released by the manufacturers.

Is there a way of customer being able to pre order stock? I have seen other post with people asking the same question, but cannot see a answer (feel free to point out the obvious if I have missed it). There are a few follow up questions as well, but they only become relevant if we can solve the pre order problem.

Thanks for any help

James

Using Version 7.02

carfin
VP-CART Expert

United Kingdom
948 Posts

Posted - December 17 2014 :  03:47:43  Show Profile  Reply with Quote
Hi James,

if you go to admin panel Cart Setup, Products and Features, Stock Control and make sure that the field xcheckstocklevel is set to No and the field xoutofstocklimit is empty (NULL). This should allow your customers to order zero stock.

Regards,

Carrol
www.deanston-electrical.co.uk
Go to Top of Page

bully456
Starting Member

United Kingdom
21 Posts

Posted - December 17 2014 :  04:27:43  Show Profile  Reply with Quote
Thank you Carrol - nice and simple.
Go to Top of Page

serjtankian
VP-CART Super User

Armenia
378 Posts

Posted - December 23 2014 :  07:13:50  Show Profile  Visit serjtankian's Homepage  Reply with Quote
is it possible to add text PRE-ORDER if the price is 0?






*serj*
Go to Top of Page

carfin
VP-CART Expert

United Kingdom
948 Posts

Posted - December 23 2014 :  09:37:57  Show Profile  Reply with Quote
Hi serj
go to Cart Setup and search for the field xprice0.
Enter your text Pre-order
This will display your message for any product that has zero price

Regards,

Carrol
www.deanston-electrical.co.uk
Go to Top of Page

bully456
Starting Member

United Kingdom
21 Posts

Posted - December 23 2014 :  10:38:36  Show Profile  Reply with Quote
This was going to be one of my next questions, although with a slight difference.

Instead of changing the xprice field is there a way of changing the ''Add to Cart'' button to say ''Pre Order''? Do I need to create a new tmp_product file of some sort or do I change this via the ''Order Button Image'' in the product setup through VPASP? Preferably something that will sort it for me rather than me having to enter the information in for each product. Thanks to anyone who takes the time to reply.

Cheers

James
Go to Top of Page

carfin
VP-CART Expert

United Kingdom
948 Posts

Posted - December 24 2014 :  04:49:17  Show Profile  Reply with Quote
Hi James,

if you''re ok with going into the files and adding a few lines of code, then this should work. It changes the add to cart button image to a Pre Order button image if out of stock
I''ve tested on our local test site and it''s fine but it will change the add to cart button of ALL your out of stock items if this is what you want.
First of all I''m assuming that you are using the default add to cart button that came with V7. (Check by using your browser''s inspect element facility)
Create a new Pre Order button image based on the existing order-now-btn.gif that you are using. You will find this button in the folder templates\default-2cols (or 3cols) depending on which layout you are using. Save the new button in the same folder.
Find the files shopfileio.asp and shopproductformat.asp and save a copy of each.
Please note that the forum formatting adds an extra single quote mark at the beginning of the comment lines with the ***

Open shopfileio.asp in an html editor or notepad
Find the sub routine called sub Add_Button (ivalue, parsearray, parseRS)
(approx. line 1400)
Find the lines
dim lngCatalogId
lngCatalogId = parsers("catalogid")
immediately after them, add the following 2 lines
dim lngcstock
lngcstock = parsers("cstock")
Then find the lines
if GetConfig("xButtonImage") <>"" then
mybutton=GetConfig("xButtonImage")
end if
end if

Overwrite them with the following:

''*** Dec2014 CUSTOM Change add to cart button to pre order button if product is out of stock
if GetConfig("xButtonImage") <>"" then
if lngcstock=0 then
mybutton="templates/default-2cols/images/preorder-btn.gif"
else
mybutton=GetConfig("xButtonImage")
end if
end if
end if

Save and close.

Open shopproductformat.asp
Find the sub routine called sub FormatButton
(approx. line 550)
After line dim rc add the following 2 lines
dim lngcstock
lngcstock = parsers("cstock")

Then find the lines
if GetConfig("xButtonImage") <>"" then
mybutton=GetConfig("xButtonImage")
end if
end if

Overwrite them with the following:

''*** Dec2014 CUSTOM Change add to cart button to pre order button if product is out of stock
if GetConfig("xButtonImage") <>"" then
if lngcstock=0 then
mybutton="templates/default-2cols/images/preorder-btn.gif"
else
mybutton=GetConfig("xButtonImage")
end if
end if
end if

Save and close.
Test on local host or upload to server.

I''m offline now until 5th January. Merry Christmas and Happy New Year :)

Carrol
www.deanston-electrical.co.uk

Edited by - carfin on December 24 2014 04:50:57
Go to Top of Page

bully456
Starting Member

United Kingdom
21 Posts

Posted - December 24 2014 :  16:00:30  Show Profile  Reply with Quote
Thank you Carrol - very helpful again. I will try this when I get back to the work PC.

Merry Christmas to you as well!
Go to Top of Page

bully456
Starting Member

United Kingdom
21 Posts

Posted - December 29 2014 :  07:00:58  Show Profile  Reply with Quote
I have had a ply with the code today and got it to work (in a fashion)Thank you again Carrol.

The only problem with it is that my new Pre Order Button only appears when you click on the product for the extended description. If I want to view a list of products I just get an error message where the button should be, and only one item appears on the page, whereas before I would get the normal list of 15. Any ideas why this would be happening please? Do I have to change something in another of the tmp_prodcut files?

I have replaced the edited files with the originals until you have time to advise Carrol (unless somebody else knows) so there is no urgency at all

Thanks & Happy New Year!

James

Just an after thought, is it possible to have another button for items that have sold out - to run alongside the ''order'' and ''pre order'' buttons? So if the item had been in stock and had sold out, the ''order now'' button would be replaced.

Edited by - bully456 on December 30 2014 11:39:39
Go to Top of Page

carfin
VP-CART Expert

United Kingdom
948 Posts

Posted - January 05 2015 :  06:00:50  Show Profile  Reply with Quote
Hi James,

have you customised the order button on the product template called tmp_productformat.htm? This is the one that is used on the page shopdisplayproducts.asp. Do you use inventory products or child products? Also can you double check in the custom code that you put into shopproductformat.asp that there is a single quote (apostrophy) before the ***** on that line and not a double quote.

Regards,

Carrol
www.deanston-electrical.co.uk
Go to Top of Page

bully456
Starting Member

United Kingdom
21 Posts

Posted - January 05 2015 :  06:57:30  Show Profile  Reply with Quote
Hello Carrol,

I have not done anything in the tmp_prodcutformat.htm file. I checked the code and had only copied across the single quote, so I imagine it is going to be the unedited .htm file that is causing the problem. What would I have in this file please?
We have a few inventory products, but only two or three out of thousands. So yes, I suppose we do.

Below is a link to the website if you want to have a look, please bear in mind it is very work in progress (thats a good excuse for it not being very good) so some bits look a bit unfinished.
http://www.cheltenhammodelcentre.com/default.asp

Many Thanks for your help and sorry for the ineptitude of my questions!

James
Go to Top of Page

carfin
VP-CART Expert

United Kingdom
948 Posts

Posted - January 05 2015 :  07:56:02  Show Profile  Reply with Quote
Hi James,if you haven''t touched the template and it works fine on the extended description page then it must be an issue with my custom code in the shopformatproduct.asp. I can have a look at the file and test it on our local site here if you like. It definitely works on ours. Save your shopformatproduct.asp file as a text file and send it to me at the email address on my profile. I will pick it up this evening and test tomorrow.
Regards,
Carrol
ps your website is fine, and I used to love making Airfix model planes :)
Go to Top of Page

bully456
Starting Member

United Kingdom
21 Posts

Posted - January 06 2015 :  10:51:30  Show Profile  Reply with Quote
Very kind Carrol, thank you. I cannot seem to find your email address on your profile though? I am missing the blatantly obvious somewhere?
Go to Top of Page

carfin
VP-CART Expert

United Kingdom
948 Posts

Posted - January 06 2015 :  11:03:51  Show Profile  Reply with Quote
Hmmm, email is set to allow users to contact me so I have no idea lol
Here is the address:


email address has now been removed


Edited by - carfin on January 07 2015 09:17:05
Go to Top of Page

bully456
Starting Member

United Kingdom
21 Posts

Posted - January 07 2015 :  04:26:18  Show Profile  Reply with Quote
Thanks, email sent. I can''t see my own email on my own profile even though it is set to be visible.
Go to Top of Page

carfin
VP-CART Expert

United Kingdom
948 Posts

Posted - January 07 2015 :  09:15:33  Show Profile  Reply with Quote
I''ve had a look at your site and it seems you are using the Generate SEO Dynamic files for your products and categories. I don''t have this option on my VP package so unfortunately I cannot test the custom code with the SEO files.
Perhaps one of the other forum users who has the Deluxe package could have a look at this for you or you could contact the support guys for a custom quote.
Although the forum lists me as a VP-ASP Expert, I''m not really. I''m just a customer who can help out quite a lot :)

Regards,

Carrol
www.deanston-electrical.co.uk
Go to Top of Page
Page: of 2
Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00