I am trying to change the text on the 'add to cart' confirmation page, but only when adding a certain product to the basket.
The product gives our customers the ability to pay for their invoices online, by a product called 'PAYINVOICE' which has a value of 1p. When they pay their invoice, they enter in the amount they wish to pay in pence, together with the invoice number and then they check it out in the usual way. It's not ideal, but it works.
In our v7 store, we had a product description which gave step-by-step instructions to using the service, which seemed to cause problems when people didn't read them (which was surprisingly often). However, I was pleased to discover in v8 that you can set conditions on items throughout the store, which would potentially remove the need to these instructions.
So, what I was trying to do was - when adding the PAYINVOICE product to the cart - was change the text labels on that page to something a bit more descriptive: for example, instead of 'quantity' I'd change it to 'enter the amount in pence', and so on.
I've looked through the knowledgebase and the documentation (including the AUG); the forums (though I didn't really know what to search for), and all of Gabriel's block tutorials, but not finding anything that helped, I tried to guess the way it could be made to work.
First, I've just done a test on the 'QuantityPrompt' on the 'add to cart' page; the idea being if I can get the substitution to occur on this small piece of text, I will then be able to roll the technique on other pieces of text elsewhere on the page. I've added a block condition round the 'QuantityPrompt' and around a small piece of text I want to substitute with in the following way:
I've tried to think how to get it to work: first, I thought if I could write a condition that looks at the page the product was added from, and then apply an 'equal to' operator on the substitution text and a 'not equal to' operator on the default text. I used the 'BackPageURL' as the variable and then entered the page name "Payments.html" in double quotes. This didn't work so I entered the full path to the page. That didn't work either.
Then I tried using the ProdRef variable and the "PAYINVOICE" reference in double quotes, which also didn't work.
I'm beginning to think that it's not possible to accomplish what I'm trying to do because the add to cart page is created by the ca00001.pl perl script - is this the case?
Or am I going about it totally the wrong way, or using the wrong syntax, or is my logic completely flawed? This is my first foray into using blocks, so any pointers or help would be gratefully received!
The product gives our customers the ability to pay for their invoices online, by a product called 'PAYINVOICE' which has a value of 1p. When they pay their invoice, they enter in the amount they wish to pay in pence, together with the invoice number and then they check it out in the usual way. It's not ideal, but it works.
In our v7 store, we had a product description which gave step-by-step instructions to using the service, which seemed to cause problems when people didn't read them (which was surprisingly often). However, I was pleased to discover in v8 that you can set conditions on items throughout the store, which would potentially remove the need to these instructions.
So, what I was trying to do was - when adding the PAYINVOICE product to the cart - was change the text labels on that page to something a bit more descriptive: for example, instead of 'quantity' I'd change it to 'enter the amount in pence', and so on.
I've looked through the knowledgebase and the documentation (including the AUG); the forums (though I didn't really know what to search for), and all of Gabriel's block tutorials, but not finding anything that helped, I tried to guess the way it could be made to work.
First, I've just done a test on the 'QuantityPrompt' on the 'add to cart' page; the idea being if I can get the substitution to occur on this small piece of text, I will then be able to roll the technique on other pieces of text elsewhere on the page. I've added a block condition round the 'QuantityPrompt' and around a small piece of text I want to substitute with in the following way:
Code:
block if QuantityPrompt /block block if substitution text /block
Then I tried using the ProdRef variable and the "PAYINVOICE" reference in double quotes, which also didn't work.
I'm beginning to think that it's not possible to accomplish what I'm trying to do because the add to cart page is created by the ca00001.pl perl script - is this the case?
Or am I going about it totally the wrong way, or using the wrong syntax, or is my logic completely flawed? This is my first foray into using blocks, so any pointers or help would be gratefully received!
Comment