ทำ Prestashop ให้เป็นเว็บให้ข้อมูลสินค้าเท่านั้นวันนี้มานำเสนอวิธีทำเว็บให้ข้อมูลอย่างเดียวครับ ไม่มีปุ่มสั่งซื้อ แบบง่ายนะครับ
ให้ทำการหาโค้ดตามนี้ที่ไฟล์ global.css
/* exclusive button */
input.exclusive, input.exclusive_disabled, a.exclusive, span.exclusive { background-image: url('../img/button-medium_exclusive.gif'); }
จากนั้นเพิ่มโค้ดเข้าไปตามนี้
/* exclusive button */
input.exclusive, input.exclusive_disabled, a.exclusive, span.exclusive { background-image: url('../img/button-medium_exclusive.gif'); display:none; }
จบครับ ง่ายๆครับ ปุ่มสั่งซื้อภายในร้านก็จะหายไป
เพิ่มรายละเอียดการปรับแต่งขึ้นมาอีกนิดครับ คราวนี้เราจะไม่ให้ในร้านแสดงราคาสินค้าด้วยครับ
หน้าแรกหน้าแรกของจะมีอยู่ประมาณ 2 จุดที่แสดงราคาสินค้า คือ Featured Product และ Special Price
สำหรับ Featured Product หากใช้ Theme ที่ผมเคยโมให้ หรือเคยโหลดโมดูล featured product ตัวใหม่ไป จะมีส่วน config ให้เปิดปิดการแสดงปุ่ม, รายละเอียดสินค้า, ราคา, Title ของสินค้าให้ใช้งานอยู่ครับ แต่ถ้าไม่มีก็ใช้ปรับแต่ง css เอาครับ โดยไปที่ไฟล์ global.css หาโค้ดตามนี้ครับ
.price-discount { text-decoration: line-through }
.price-pretax { color: gray }
.price-ecotax { color: #488c40 }
img.icon { margin-right: 0.5em; vertical-align: middle }
.price, .price-shipping, .price-wrapping {
color: #da0f00;
font-size: 1.1em;
font-weight: bold;
white-space: nowrap
}
เพิ่มโค้ดดังนี้
.price-discount { text-decoration: line-through; display:none; }
.price-pretax { color: gray; display:none; }
.price-ecotax { color: #488c40; display:none; }
.reduction {display:none;}
img.icon { margin-right: 0.5em; vertical-align: middle }
.price, .price-shipping, .price-wrapping {
color: #da0f00;
font-size: 1.1em;
font-weight: bold;
white-space: nowrap;
display:none;
}
หน้า Product listเป็นหน้าลิสรายการสินค้าในหน้าต่างๆนะครับ เช่น All special price, New product, Category, Sub category
แก้ไขโค้ด global.css โดยหาโค้ดตามนี้ครับ
ul#product_list li div.center_block {
float: left;
width: 74%
}
ul#product_list li div.right_block {
float: left;
width: 11em;
text-align: right;
margin-left: 1em;
margin-top: 0;
}
แก้ไขเป็น
ul#product_list li div.center_block {
float: left;
width: 100%
}
ul#product_list li div.right_block {
float: left;
width: 11em;
text-align: right;
margin-left: 1em;
margin-top: 0;
display:none;
}
หน้ารายละเอียดสินค้าแก้ไขโค้ดที่ไฟล์ global.css โดยหาโค้ดตามนี้
#primary_block form#buy_block {
background: #f1f2f4 url('../img/product-buy-bg.gif') repeat-x top left;
font-size: 1.1em;
padding: 0.7em;
color: #374853;
border: 1px #d0d3d8 solid;
}
แก้ไขเป็น
#primary_block form#buy_block {
background: #f1f2f4 url('../img/product-buy-bg.gif') repeat-x top left;
font-size: 1.1em;
padding: 0.7em;
color: #374853;
border: 1px #d0d3d8 solid;
display:none;
}
ข้อมูลเพิ่มเติมครับการทำแบบนี้ ไม่ได้เป็นการปิดระบบสั่งซื้อแบบสมบูรณ์นะครับ หากใครรู้หลักการทำงานของเว็บหรือเป็นโปรแกรมเมอร์ก็คงหาทางสั่งซื้อได้ แต่อย่างว่าครับ สั่งซื้อไปก็เท่านั้น เว็บเราแค่ให้ข้อมูล และผมแนะนำให้ปิดการทำงานของโมดูล Block cart ด้วยนะครับ ยังไงก็ไม่ได้ใช้