WebsiteBaker Support (2.8.x) > Bakery Shop
Bakery: Small Shop Module (ORIGINAL TOPIC)
freeSbee:
@ Ogierini
--- Quote from: Ogierini on September 24, 2008, 01:08:33 PM ---per order I would like to have one single amount for the sending costs/'verzendkosten'
...
But he counts the sending cost per item and not per shipment.
--- End quote ---
Hi Irene
http://www.bakery-shop.ch/#shipping
1. Set "Shipping based on..." to "a flat amount"
2. Leave "Shipping per item" blank.
--- Quote from: Ogierini on September 24, 2008, 01:08:33 PM ---And why is the module still in testing phase? The results are good further what I read here....
--- End quote ---
Yes, they are. But I assume that Bakery still has some minor bugs...
Regards Christoph
Boudi:
Hi there,
First of all: great shop with lots of potential. More and more the shop is growing. So keep up the good work!
But I stick with a question:
At this moment I'm working on a multilanguage website. The problem that I'm facing is that the shop only will show 1 language, no matter which language I choose on the website itself.
In this case the shop is dutch, but the website has 4 languages. In the other languages the visitors watch the shop in Dutch too.
Is there some way to avoid this issue? Otherwise the shop seems useless on a multilanguage website.
Greetz
Boudi
cthamer:
Hello freeSbee
I saw a few messages earlier in the forum for tax rates in the US. It is necessary here in the US to charge sales tax to orders shipping to the same state of the store.
The cart currently has the option to charge tax based on country. It seems a simple thing to replicate that for orders placed in the US with the state being compared rather than country.
I am going to do this for a client but it would be nice to have it standard in the cart.
In view_summary.php you have:
if($cust_country == $setting_shop_country) {
// Loop through ordered items
for($i = 1; $i <= sizeof($items); $i++) {
if ($setting_tax_included == "included") {
// Calculate tax amount for prices including tax (brutto)
$sales_tax = $sales_tax + $items[$i]['price'] * $items[$i]['quantity'] * $items[$i]['tax_rate'] / (100 + $items[$i]['tax_rate']);
}
else {
// Calculate tax amount for prices excluding tax (netto)
$sales_tax = $sales_tax + $items[$i]['price'] * $items[$i]['quantity'] / 100 * $items[$i]['tax_rate'];
}
// Get tax rate(s) for display
$f_tax_rate_array[] = number_format($items[$i]['tax_rate'],1);
}
}
If you added a state field to the general settings you could duplicate it as:
if($cust_state == $setting_shop_state) {
// Loop through ordered items
...
Wait that wouldn't work as you don't want to charge all states tax in the US so you would change the condition to:
if(($cust_country == $setting_shop_country && $cust_country != 'USA' ) || ($cust_state == $setting_shop_state && $cust_country == 'USA')) {... // USA would be whatever code you are using for the US
Am I missing any other areas of code that would need to be changed?
Best regards,
Christian
cthamer:
BTW before I say anything else great job with the module.
I just thought of another small change that would be nice. In add.php you set the default values for header, item loop, footer, etc. I would be helpful if those default values could be changed. That way users would not have to update those fields for every product. If you replicated the section in page settings that sets these into general settings then saved that in the database as the default values for new pages users would be able to save a bit of time when creating new Bakery pages.
I realize you can go to an existing page in which you have already modified the header for example and choose to save that to all other pages which is very helpful by the way. But being able to change the default values would be a big improvement for people that are changing the look of the cart to work with a custom template.
cthamer:
freeSbee,
Ok one last suggestion while my mind is still on your module then I will leave you alone.
I have been trying to get your module to fit into my existing template. 75 percent of the work can be done by modifying your frontend.css file. Thanks for the good job on that. However in the other 25% it is necessary to modify your code to get things to layout correctly in some cases.
One very helpful addition to your layout would be a div wrapper around each section of code with a corresponding entry in the CSS file. The entry for each wrapper should blank or contain just enough style definitions to keep your current layout from breaking.
For example in the view_cart.php file I added the following just before the start of the output (and of course the closing div in the appropriate place).
echo "\n<div style='float: left; width: 650px'>\n";
That could be changed to echo "\n<div class='cart_wrapper'>\n"; with cart_wrapper being set to
.cart_wrapper { /* placeholder for style statements*/ } in the frontend.css file. Actually as I am typing this I am looking at the module code and the wrapper may belong in view.php instead since everything is output through that file. Or maybe a wrapper for the whole shebang and for each section. I am not sure without playing around with it a little longer.
Anyway this would make integrating Bakery in a custom template much easier as even more of the layout could be controlled directly through frontend.css.
No more comments from me today. I promise.
Christian
addendum - I went ahead and did this with the view.php file and it worked out fine. It was necessary to echo the closing div tag before each of your return statements.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version