Hi guys,
I have a few questions regarding the setup of Publications in DW10, which I’m implementing for a client. The goal is to display a customer-specific product price list on the website. Here’s what I need to clarify:
- like this for example:
Hi guys,
I have a few questions regarding the setup of Publications in DW10, which I’m implementing for a client. The goal is to display a customer-specific product price list on the website. Here’s what I need to clarify:
Hi
1) You need to create a seperate website. The website uses a "Design" located in the "Templates/Designs/Publication" folder - and your website is probably using the Swift design found under "Templates/Designs/Swift". A website can only use one design at a time. Also publications have their own set of item types with inheritance.
2) You can use field display groups to control which fields are shown. On a page in the publications you can insert a "product fields" component and select a display group that contains the fields you want to display.
3) If a user is logged in, the price list will automatically find the right price. So you can simply create a link to the catalog page you create - as long as it is on the same domain, the user will be logged in and the prices will be calculated for that particular user.
There is no specific download link from the customer page - so simply link to the catalog.
If you want them to download and old fashioned PDF file, you have a couple of options (DW9 supports ?pdf=true but that does not exist on DW10)
<!DOCTYPE html> <html> <head> <title>Export to PDF</title> <!-- Include jsPDF and html2canvas from CDN --> <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script> </head> <body> <div id="content"> ... This is the content of your publications page ... </div> <button id="download">Download PDF</button> <script> document.getElementById('download').addEventListener('click', () => { const { jsPDF } = window.jspdf; const element = document.getElementById('content'); html2canvas(element).then((canvas) => { const imgData = canvas.toDataURL('image/png'); const pdf = new jsPDF(); const imgProps= pdf.getImageProperties(imgData); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = (imgProps.height * pdfWidth) / imgProps.width; pdf.addImage(imgData, 'PNG', 0, 0, pdfWidth, pdfHeight); pdf.save('document.pdf'); }); }); </script> </body> </html>
I am personally not fan of downloading a PDF - as that is already old the minute you press download - if a price or inventory or product data changes tomorrow, the content of the PDF is out of date and can cause confusion and misunderstandings.
Hi Nicolai ,
Thank you for the clear answers!
Regarding question 3, I still have a follow-up: how exactly should I link to the publication? For example, if I have a website, do I need to add a specific component on my page, or how do I link the publications so that they are shown when the customer clicks on “My price list” in the My Account menu? This part is still not completely clear to me.
In terms of configuration, do I need to set up anything special to ensure that the prices are shown according to the logged-in customer?
Thanks in advance!
Hi Ferri
The link to "My price list" from whereever you want it, is a just a link to the page with the price list page you have setup using Publications.
So e.g. you have a Publications website in the admin with the price list page, and you have a regular webshop - from the regular website you simply make a link from a navigation item or a page in the customer center to the publications page - and then that is it.
You do not need to configure the publications price list page to adhere to personal prices - that happens automatically.
BR Nicolai
Hi Nicolai,
Sorry for the hassle — I feel like I’m almost there but can’t seem to find it.
For example, I have a “My pricelist” option in my regular website
Which is in this website:
Now I need to add the link to the publication page here, correct?:
My question is: which exact link from the Publications site should I use, and how do I obtain that link in the admin?
Because when i click "preview" on either publications or catalog i receive a 404:
Thanks for clarifying!
In this case you can do it in the rich text editor:
Mark the link text, choose the link icon, and choose page. In the page selector that appears, navigate to your publications website and choose the product list page.
You must be logged in to post in the forum